PersistentNotification unregister workaround.

This commit is contained in:
Johannes Mockenhaupt 2017-10-20 20:15:37 +02:00
parent 950d1b62db
commit e2d684ac33
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -191,11 +191,14 @@ public class PersistentNotificationPlugin implements PluginBase {
private void checkBusRegistration() { private void checkBusRegistration() {
if (fragmentEnabled) { if (fragmentEnabled) {
MainApp.bus().register(this); try {
MainApp.bus().register(this);
} catch (IllegalArgumentException e) {
}
} else { } else {
try { try {
MainApp.bus().unregister(this); MainApp.bus().unregister(this);
} catch (Exception e) { } catch (IllegalArgumentException e) {
} }
} }
} }