mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
Fix issue where notification settings were slow to open.
This commit is contained in:
@@ -7,6 +7,7 @@ package org.thoughtcrime.securesms.notifications
|
||||
|
||||
import android.os.Build
|
||||
import android.text.TextUtils
|
||||
import androidx.annotation.WorkerThread
|
||||
import org.signal.core.util.logging.Log
|
||||
import org.thoughtcrime.securesms.database.LocalMetricsDatabase
|
||||
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies
|
||||
@@ -85,6 +86,7 @@ object SlowNotificationHeuristics {
|
||||
return true
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
@JvmStatic
|
||||
fun isHavingDelayedNotifications(): Boolean {
|
||||
if (!SignalStore.settings().isMessageNotificationsEnabled ||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
package org.thoughtcrime.securesms.notifications
|
||||
|
||||
import android.os.Build
|
||||
import androidx.annotation.WorkerThread
|
||||
import androidx.lifecycle.ViewModel
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.rxjava3.core.Observable
|
||||
@@ -43,6 +44,7 @@ class SlowNotificationsViewModel : ViewModel() {
|
||||
checkSubject.onNext(Unit)
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
private fun checkHeuristics(): Single<State> {
|
||||
return Single.fromCallable {
|
||||
var state = State.NONE
|
||||
|
||||
Reference in New Issue
Block a user