Introduce additional logging for group call updates.
This commit is contained in:
parent
54bbe48869
commit
148b40e4ff
1 changed files with 9 additions and 0 deletions
|
@ -812,14 +812,18 @@ class CallTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTabl
|
|||
peekJoinedUuids: Collection<UUID>,
|
||||
isCallFull: Boolean
|
||||
) {
|
||||
Log.d(TAG, "Updating group call from peek.")
|
||||
val callId = peekGroupCallEraId?.let { CallId.fromEra(it) }
|
||||
val recipientId = SignalDatabase.threads.getRecipientIdForThreadId(threadId)
|
||||
val call = if (callId != null && recipientId != null) {
|
||||
Log.d(TAG, "Found local call event.")
|
||||
getCallById(callId.longValue(), recipientId)
|
||||
} else {
|
||||
Log.d(TAG, "Did not find local call event.")
|
||||
null
|
||||
}
|
||||
|
||||
Log.d(TAG, "Updating message database record.")
|
||||
SignalDatabase.messages.updatePreviousGroupCall(
|
||||
threadId = threadId,
|
||||
peekGroupCallEraId = peekGroupCallEraId,
|
||||
|
@ -829,8 +833,11 @@ class CallTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTabl
|
|||
)
|
||||
|
||||
if (call != null) {
|
||||
Log.d(TAG, "Updating call database record.")
|
||||
updateGroupCallState(call, peekJoinedUuids)
|
||||
AppDependencies.databaseObserver.notifyCallUpdateObservers()
|
||||
} else {
|
||||
Log.d(TAG, "No call database record to update!")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -886,6 +893,8 @@ class CallTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTabl
|
|||
): Boolean {
|
||||
val localJoined = call.didLocalUserJoin || hasLocalUserJoined
|
||||
|
||||
Log.d(TAG, "Updating group call state: localJoined: $localJoined, isGroupCallActive: $isGroupCallActive")
|
||||
|
||||
return writableDatabase.update(TABLE_NAME)
|
||||
.values(
|
||||
LOCAL_JOINED to localJoined,
|
||||
|
|
Loading…
Add table
Reference in a new issue