perf(#1171): async AuthManager startup with readiness gate and lazy database (#1182)

Co-authored-by: hy4ri <hy4ri@users.noreply.github.com>
This commit is contained in:
M57
2026-09-17 20:54:03 +03:00
committed by GitHub
co-authored by hy4ri
parent 736433b326
commit 220779bf19
15 changed files with 413 additions and 176 deletions
@@ -296,6 +296,7 @@ class ChatNotificationService : Service() {
*/
object NotificationHelper {
fun start(context: Context) {
if (AuthManager.initializationState.value != AuthManager.InitializationState.Ready) return
if (AuthManager.getToken().isNullOrBlank()) return
// Only run the foreground service while a reply is actually pending
// (issue #794) — otherwise the mandatory persistent "Waiting for