fix(auth): initialize AuthManager in custom application class (#172)

Closes #68. Redundant initialization in MainActivity has been removed.
This commit is contained in:
M57 authored and GitHub committed 2026-06-20 17:43:40 +03:00
1 parent a50628696f
commit 54a195bd94
3 files changed
+12 -2

No files matched your search

@@ -0,0 +1,11 @@
package com.m57.hermescontrol
import android.app.Application
import com.m57.hermescontrol.data.local.AuthManager
class HermesControlApp : Application() {
override fun onCreate() {
super.onCreate()
AuthManager.init(this)
}
}
@@ -16,8 +16,6 @@ class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
AuthManager.init(this)
// Read notification tap sessionId (if any) from the intent that launched us
val notificationSessionId = intent?.getStringExtra(NotificationReplyReceiver.EXTRA_SESSION_ID)