From e85950477aa2ab38b94876d479ebea2e7e57354b Mon Sep 17 00:00:00 2001 From: Sneh Date: Fri, 13 Sep 2024 14:23:27 +0530 Subject: [PATCH 1/3] changed sendNewPlaceNotification function call with sendNewPlaceAddedNotification --- .../com/canopas/yourspace/data/service/place/ApiPlaceService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/src/main/java/com/canopas/yourspace/data/service/place/ApiPlaceService.kt b/data/src/main/java/com/canopas/yourspace/data/service/place/ApiPlaceService.kt index 127fde1a..c8e399af 100644 --- a/data/src/main/java/com/canopas/yourspace/data/service/place/ApiPlaceService.kt +++ b/data/src/main/java/com/canopas/yourspace/data/service/place/ApiPlaceService.kt @@ -72,7 +72,7 @@ class ApiPlaceService @Inject constructor( "createdBy" to createdBy, "spaceMemberIds" to spaceMemberIds ) - functions.getHttpsCallable("sendNewPlaceNotification").call(data).addOnSuccessListener { + functions.getHttpsCallable("sendNewPlaceAddedNotification").call(data).addOnSuccessListener { Timber.d("Notification sent successfully") }.addOnFailureListener { Timber.e(it, "Failed to send new place notification") From 615a1f8493cb9bf6596b4448bcbe854fb11a25fe Mon Sep 17 00:00:00 2001 From: Sneh Shah <165657841+cp-sneh-s@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:28:38 +0530 Subject: [PATCH 2/3] Update build.yaml --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d411c5f7..accf8170 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -47,7 +47,7 @@ jobs: mv app/build/outputs/apk/release/*.apk . - name: Upload Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: YourSpace APK path: YourSpace*.apk From a670930f687e33da9f34f9db259374a981c6a7a7 Mon Sep 17 00:00:00 2001 From: Sneh Date: Wed, 18 Sep 2024 14:05:39 +0530 Subject: [PATCH 3/3] remove http call. --- .../data/service/place/ApiPlaceService.kt | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/data/src/main/java/com/canopas/yourspace/data/service/place/ApiPlaceService.kt b/data/src/main/java/com/canopas/yourspace/data/service/place/ApiPlaceService.kt index c8e399af..4084ef38 100644 --- a/data/src/main/java/com/canopas/yourspace/data/service/place/ApiPlaceService.kt +++ b/data/src/main/java/com/canopas/yourspace/data/service/place/ApiPlaceService.kt @@ -8,18 +8,15 @@ import com.google.android.libraries.places.api.model.Place import com.google.android.libraries.places.api.net.PlacesClient import com.google.android.libraries.places.api.net.SearchByTextRequest import com.google.firebase.firestore.FirebaseFirestore -import com.google.firebase.functions.FirebaseFunctions import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.emptyFlow import kotlinx.coroutines.flow.first import kotlinx.coroutines.tasks.await -import timber.log.Timber import javax.inject.Inject class ApiPlaceService @Inject constructor( private val db: FirebaseFirestore, - private val placesClient: PlacesClient, - private val functions: FirebaseFunctions + private val placesClient: PlacesClient ) { private val spaceRef = db.collection(Config.FIRESTORE_COLLECTION_SPACES) @@ -65,18 +62,6 @@ class ApiPlaceService @Inject constructor( settings.forEach { setting -> spacePlacesSettingsRef(spaceId, place.id).document(setting.user_id).set(setting).await() } - - val data = mapOf( - "spaceId" to spaceId, - "placeName" to name, - "createdBy" to createdBy, - "spaceMemberIds" to spaceMemberIds - ) - functions.getHttpsCallable("sendNewPlaceAddedNotification").call(data).addOnSuccessListener { - Timber.d("Notification sent successfully") - }.addOnFailureListener { - Timber.e(it, "Failed to send new place notification") - } } suspend fun joinUserToExistingPlaces(