PersistentNotification unregister workaround.
This commit is contained in:
parent
950d1b62db
commit
e2d684ac33
|
@ -191,11 +191,14 @@ public class PersistentNotificationPlugin implements PluginBase {
|
|||
|
||||
private void checkBusRegistration() {
|
||||
if (fragmentEnabled) {
|
||||
MainApp.bus().register(this);
|
||||
try {
|
||||
MainApp.bus().register(this);
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
MainApp.bus().unregister(this);
|
||||
} catch (Exception e) {
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue