Notifier: init app if uninitialized (#404)

Fixes tailscale/corp#20087

Signed-off-by: kari-ts <kari@tailscale.com>
pull/367/head
kari-ts 6 months ago committed by GitHub
parent 006b1e6852
commit 999c6f2357
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -4,6 +4,7 @@
package com.tailscale.ipn.ui.notifier
import android.util.Log
import com.tailscale.ipn.App
import com.tailscale.ipn.ui.model.Empty
import com.tailscale.ipn.ui.model.Ipn
import com.tailscale.ipn.ui.model.Ipn.Notify
@ -56,6 +57,9 @@ object Notifier {
@OptIn(ExperimentalSerializationApi::class)
fun start(scope: CoroutineScope) {
Log.d(TAG, "Starting")
if (!::app.isInitialized) {
App.get()
}
scope.launch(Dispatchers.IO) {
val mask =
NotifyWatchOpt.Netmap.value or

Loading…
Cancel
Save