Skip to content

Commit

Permalink
fix : fix the LocationViewMap.kt to put the text just under the pins …
Browse files Browse the repository at this point in the history
…and add and other small fixes
  • Loading branch information
MaxCastelCast committed Dec 18, 2024
1 parent c8cd853 commit 12221a3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,21 +128,22 @@ class MeetingRequestService : FirebaseMessagingService() {
val stringReason =
when (message) {
"DISTANCE" -> DISTANCE_REASON_CANCELLATION
"TIME" -> TIME_REASON_CANCELLATION
//"TIME" -> TIME_REASON_CANCELLATION
"CANCELLED" -> CANCELLED_REASON_CANCELLATION
"CLOSED" -> CLOSED_APP_REASON_CANCELLATION
else -> DEFAULT_REASON_CANCELLATION
}

MeetingRequestManager.meetingRequestViewModel?.removeFromMeetingRequestSent(senderUid) {
MeetingRequestManager.meetingRequestViewModel?.removeFromMeetingRequestInbox(senderUid) {
MeetingRequestManager.meetingRequestViewModel?.removeChosenLocalisation(senderUid) {
MeetingRequestManager.meetingRequestViewModel?.updateInboxOfMessages {}
if(stringReason != DEFAULT_REASON_CANCELLATION) {
MeetingRequestManager.meetingRequestViewModel?.removeFromMeetingRequestSent(senderUid) {
MeetingRequestManager.meetingRequestViewModel?.removeFromMeetingRequestInbox(senderUid) {
MeetingRequestManager.meetingRequestViewModel?.removeChosenLocalisation(senderUid) {
MeetingRequestManager.meetingRequestViewModel?.updateInboxOfMessages {}
}
}
}
MeetingRequestManager.meetingRequestViewModel?.stopMeetingRequestTimer(senderUid, this)
showNotification("Cancelled meeting with $senderName", stringReason)
}
MeetingRequestManager.meetingRequestViewModel?.stopMeetingRequestTimer(senderUid, this)
showNotification("Cancelled meeting with $senderName", stringReason)
}
"ENGAGEMENT NOTIFICATION" -> {
// Only show engagement notifications if app is in background
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ private const val MARKER_TITLE = "Meeting Request's location"
private const val OUR_MARKER_TITLE = "Our location"
private const val OUR_MARKER_TEXT = "You are here"
private const val TEST_UID = "2"
private val MARKER_HEIGHT = 90.dp
private val MARKER_HEIGHT = 40.dp
private const val DEFAULT_SCREEN_COORDINATE = 0F
private const val USER_UID = "userId"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.github.se.icebreakrr.ui.profile

import android.util.Log
import android.widget.Toast
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
Expand Down Expand Up @@ -68,6 +67,7 @@ private const val ACCEPT_DECLINE_ICON_BUTTON_PADDING = 12
private const val ACCEPT_DECLINE_ICON_BUTTON_SIZE = 48
private const val ACCEPT_DECLINE_ICON_BUTTON_ROUNDED = 100
private const val ACCEPT_DECLINE_ICON_BUTTON_COLOR = 0xFF65558F
private const val ACCEPT_MEETING_REQUEST = "The user accepted your meeting request"

/**
* Screen that appears when you click on a profile in the notification tab. You can accept or
Expand Down Expand Up @@ -138,13 +138,6 @@ fun InboxProfileViewScreen(
location,
locationMessage)
}
Toast.makeText(
context,
"You've accepted the request, " +
profile.name +
" is choosing the location of your meeting!",
Toast.LENGTH_SHORT)
.show()
},
{
if (location != null) {
Expand Down Expand Up @@ -190,7 +183,7 @@ fun acceptDeclineCode(
locationMessage: String
) {
meetingRequestViewModel.setMeetingResponse(
fcm, "accepting/decline request", accepted, location.toString())
fcm, ACCEPT_MEETING_REQUEST, accepted, location.toString())
meetingRequestViewModel.sendMeetingResponse()
if (accepted) {
meetingRequestViewModel.confirmMeetingRequest(uid, Pair(locationMessage, location)) {
Expand Down

0 comments on commit 12221a3

Please sign in to comment.