From 841c395b9d24e30cd13888c7ef90210b8642e3de Mon Sep 17 00:00:00 2001 From: cp-megh Date: Thu, 5 Sep 2024 14:54:30 +0530 Subject: [PATCH] minor changes --- .../canopas/yourspace/data/service/space/ApiSpaceService.kt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/data/src/main/java/com/canopas/yourspace/data/service/space/ApiSpaceService.kt b/data/src/main/java/com/canopas/yourspace/data/service/space/ApiSpaceService.kt index bc71e097..c20f7fc2 100644 --- a/data/src/main/java/com/canopas/yourspace/data/service/space/ApiSpaceService.kt +++ b/data/src/main/java/com/canopas/yourspace/data/service/space/ApiSpaceService.kt @@ -38,7 +38,6 @@ class ApiSpaceService @Inject constructor( suspend fun joinSpace(spaceId: String, role: Int = SPACE_MEMBER_ROLE_MEMBER) { val userId = authService.currentUser?.id ?: "" - spaceMemberRef(spaceId) spaceMemberRef(spaceId) .document(userId).also { val member = ApiSpaceMember( @@ -54,7 +53,6 @@ class ApiSpaceService @Inject constructor( } suspend fun enableLocation(spaceId: String, userId: String, enable: Boolean) { - spaceMemberRef(spaceId) spaceMemberRef(spaceId) .whereEqualTo("user_id", userId).get() .await().documents.firstOrNull() @@ -62,7 +60,6 @@ class ApiSpaceService @Inject constructor( } suspend fun isMember(spaceId: String, userId: String): Boolean { - spaceMemberRef(spaceId) val query = spaceMemberRef(spaceId) .whereEqualTo("user_id", userId) val result = query.get().await() @@ -82,7 +79,6 @@ class ApiSpaceService @Inject constructor( spaceMemberRef(spaceId).snapshotFlow(ApiSpaceMember::class.java) private suspend fun deleteMembers(spaceId: String) { - spaceMemberRef(spaceId) spaceMemberRef(spaceId).get().await().documents.forEach { doc -> doc.reference.delete().await() } @@ -95,7 +91,6 @@ class ApiSpaceService @Inject constructor( suspend fun removeUserFromSpace(spaceId: String, userId: String) { placeService.removedUserFromExistingPlaces(spaceId, userId) - spaceMemberRef(spaceId) spaceMemberRef(spaceId) .whereEqualTo("user_id", userId).get().await().documents.forEach { it.reference.delete().await()