kopia lustrzana https://github.com/ryukoposting/Signal-Android
Don't unnecessarily create threads for groups.
rodzic
fb8f481a87
commit
7c8549bf5e
|
@ -287,17 +287,19 @@ public final class SignalCallManager implements CallManager.Observer, GroupCall.
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
callManager.peekGroupCall(SignalStore.internalValues().groupCallingServer(), credential.getTokenBytes().toByteArray(), members, peekInfo -> {
|
callManager.peekGroupCall(SignalStore.internalValues().groupCallingServer(), credential.getTokenBytes().toByteArray(), members, peekInfo -> {
|
||||||
long threadId = DatabaseFactory.getThreadDatabase(context).getOrCreateThreadIdFor(group);
|
Long threadId = DatabaseFactory.getThreadDatabase(context).getThreadIdFor(group.getId());
|
||||||
|
|
||||||
DatabaseFactory.getSmsDatabase(context)
|
if (threadId != null) {
|
||||||
.updatePreviousGroupCall(threadId,
|
DatabaseFactory.getSmsDatabase(context)
|
||||||
peekInfo.getEraId(),
|
.updatePreviousGroupCall(threadId,
|
||||||
peekInfo.getJoinedMembers(),
|
peekInfo.getEraId(),
|
||||||
WebRtcUtil.isCallFull(peekInfo));
|
peekInfo.getJoinedMembers(),
|
||||||
|
WebRtcUtil.isCallFull(peekInfo));
|
||||||
|
|
||||||
ApplicationDependencies.getMessageNotifier().updateNotification(context, threadId, true, 0, BubbleUtil.BubbleState.HIDDEN);
|
ApplicationDependencies.getMessageNotifier().updateNotification(context, threadId, true, 0, BubbleUtil.BubbleState.HIDDEN);
|
||||||
|
|
||||||
EventBus.getDefault().postSticky(new GroupCallPeekEvent(id, peekInfo.getEraId(), peekInfo.getDeviceCount(), peekInfo.getMaxDevices()));
|
EventBus.getDefault().postSticky(new GroupCallPeekEvent(id, peekInfo.getEraId(), peekInfo.getDeviceCount(), peekInfo.getMaxDevices()));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} catch (IOException | VerificationFailedException | CallException e) {
|
} catch (IOException | VerificationFailedException | CallException e) {
|
||||||
Log.e(TAG, "error peeking from active conversation", e);
|
Log.e(TAG, "error peeking from active conversation", e);
|
||||||
|
|
Ładowanie…
Reference in New Issue