mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-01 03:36:53 +01:00
adding catch around the push event dispatching to match previous behaviour
This commit is contained in:
parent
57037c9ac6
commit
037d1fcf52
@ -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…
x
Reference in New Issue
Block a user