diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/webrtc/ActiveCallManager.kt b/app/src/main/java/org/thoughtcrime/securesms/service/webrtc/ActiveCallManager.kt index 03bc84989a..2fac15deb8 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/webrtc/ActiveCallManager.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/service/webrtc/ActiveCallManager.kt @@ -411,25 +411,23 @@ class ActiveCallManager( val recipient: Recipient = Recipient.resolved(IntentCompat.getParcelableExtra(intent, EXTRA_RECIPIENT_ID, RecipientId::class.java)!!) val isVideoCall = intent.getBooleanExtra(EXTRA_IS_VIDEO_CALL, false) - if (requiresAsyncNotificationLoad) { - if (asyncServiceNotification != null && lastAsyncServiceNotificationType == type) { - return asyncServiceNotification!! - } - - val requestTime = System.currentTimeMillis() - lastAsyncServiceNotificationRequestTime = requestTime - notificationDisposable = Single.fromCallable { createNotification(type, recipient, isVideoCall, skipAvatarLoad = false) } - .subscribeOn(Schedulers.io()) - .filter { requestTime == lastAsyncServiceNotificationRequestTime } - .observeOn(AndroidSchedulers.mainThread()) - .subscribeBy { notification -> - lastAsyncServiceNotificationType = type - asyncServiceNotification = notification - update(this, type, recipient.id, isVideoCall) - } + if (asyncServiceNotification != null && lastAsyncServiceNotificationType == type) { + return asyncServiceNotification!! } - return createNotification(type, recipient, isVideoCall, skipAvatarLoad = requiresAsyncNotificationLoad) + val requestTime = System.currentTimeMillis() + lastAsyncServiceNotificationRequestTime = requestTime + notificationDisposable = Single.fromCallable { createNotification(type, recipient, isVideoCall, skipAvatarLoad = false) } + .subscribeOn(Schedulers.io()) + .filter { requestTime == lastAsyncServiceNotificationRequestTime } + .observeOn(AndroidSchedulers.mainThread()) + .subscribeBy { notification -> + lastAsyncServiceNotificationType = type + asyncServiceNotification = notification + update(this, type, recipient.id, isVideoCall) + } + + return createNotification(type, recipient, isVideoCall, skipAvatarLoad = true) } override fun onServiceUpdateCommandReceived(intent: Intent) {