Skip to content

Commit 0464d02

Browse files
committed
chore: Refactor custom item deletion in CallsGroupCallModule and update imports in CallsModule
1 parent 2476787 commit 0464d02

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

android/src/main/java/com/sendbird/calls/reactnative/module/CallsGroupCallModule.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,8 @@ class CallsGroupCallModule: GroupCallModule {
199199

200200
CallsUtils.safeRun(promise) {
201201
val room = CallsUtils.findRoom(roomId, from)
202-
val allKeys = room.customItems.keys
203-
204202
// There is no deleteAllCustomItems API in Android native, so handled with deleteCustomItems.
205-
room.deleteCustomItems(allKeys) { updatedItems, affectedKeys, error ->
203+
room.deleteCustomItems(null) { updatedItems, affectedKeys, error ->
206204
if (error != null) {
207205
promise.rejectCalls(error)
208206
} else {

android/src/main/java/com/sendbird/calls/reactnative/module/CallsModule.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.sendbird.calls.reactnative.module
22

33
import com.facebook.react.bridge.Promise
44
import com.facebook.react.bridge.ReactApplicationContext
5+
import com.facebook.react.bridge.ReadableArray
56
import com.facebook.react.bridge.ReadableMap
67
import com.sendbird.calls.DirectCall
78
import com.sendbird.calls.RoomInvitation

android/src/main/java/com/sendbird/calls/reactnative/module/CallsModuleStruct.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.sendbird.calls.reactnative.module
22

33
import com.facebook.react.bridge.Promise
4+
import com.facebook.react.bridge.ReadableArray
45
import com.facebook.react.bridge.ReadableMap
56

67
interface CallsModuleStruct: CommonModule, DirectCallModule, GroupCallModule { }
@@ -68,4 +69,4 @@ interface MediaDeviceControl {
6869
fun selectVideoDevice(type: String, identifier: String, device: ReadableMap, promise: Promise)
6970
fun resumeVideoCapturer(type: String, identifier: String)
7071
fun resumeAudioTrack(type: String, identifier: String)
71-
}
72+
}

0 commit comments

Comments
 (0)