Improved hide notification when not needed
This commit is contained in:
parent
c3f5a39007
commit
47f0f3ddf4
1 changed files with 11 additions and 0 deletions
|
@ -121,6 +121,17 @@ class CoreContext(val context: Context, coreConfig: Config) {
|
||||||
Log.i("[Context] Global state changed [$state]")
|
Log.i("[Context] Global state changed [$state]")
|
||||||
if (state == GlobalState.On) {
|
if (state == GlobalState.On) {
|
||||||
contactsManager.fetchContactsAsync()
|
contactsManager.fetchContactsAsync()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onAccountRegistrationStateChanged(
|
||||||
|
core: Core,
|
||||||
|
account: Account,
|
||||||
|
state: RegistrationState?,
|
||||||
|
message: String
|
||||||
|
) {
|
||||||
|
Log.i("[Context] Account [${account.params.identityAddress?.asStringUriOnly()}] registration state changed [$state]")
|
||||||
|
if (state == RegistrationState.Ok && account == core.defaultAccount) {
|
||||||
notificationsManager.stopForegroundNotificationIfPossible()
|
notificationsManager.stopForegroundNotificationIfPossible()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue