Skip to content

Commit

Permalink
fix: server config crash (RC) (#1786)
Browse files Browse the repository at this point in the history
* fix: serverConfig crash

* chore: cleanup
  • Loading branch information
ohassine authored May 15, 2023
1 parent fe907d1 commit 82aefb9
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,17 @@ class WireNotificationManager @Inject constructor(
if (currentScreen !is CurrentScreen.InBackground) {
flowOf(null)
} else {
coreLogic.getSessionScope(userId).calls
.establishedCall()
.map {
it.firstOrNull()?.let { call ->
OngoingCallData(callNotificationManager.getNotificationTitle(call), call.conversationId, userId)
try {
coreLogic.getSessionScope(userId).calls
.establishedCall()
.map {
it.firstOrNull()?.let { call ->
OngoingCallData(callNotificationManager.getNotificationTitle(call), call.conversationId, userId)
}
}
}
} catch (e: IllegalStateException) {
flowOf(null)
}
}
}
.distinctUntilChanged()
Expand Down

0 comments on commit 82aefb9

Please sign in to comment.