mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 17:35:54 +03:00
adding catch around the push event dispatching to match previous behaviour
This commit is contained in:
parent
57037c9ac6
commit
037d1fcf52
1 changed files with 6 additions and 1 deletions
|
@ -41,6 +41,7 @@ import org.matrix.android.sdk.internal.session.pushers.UpdatePushRuleActionsTask
|
|||
import org.matrix.android.sdk.internal.session.pushers.UpdatePushRuleEnableStatusTask
|
||||
import org.matrix.android.sdk.internal.task.TaskExecutor
|
||||
import org.matrix.android.sdk.internal.task.configureWith
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
@SessionScope
|
||||
|
@ -160,7 +161,11 @@ internal class DefaultPushRuleService @Inject constructor(
|
|||
fun dispatchEvents(pushEvents: PushEvents) {
|
||||
synchronized(listeners) {
|
||||
listeners.forEach {
|
||||
it.onEvents(pushEvents)
|
||||
try {
|
||||
it.onEvents(pushEvents)
|
||||
} catch (e: Throwable) {
|
||||
Timber.e(e, "Error while dispatching push events")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue