fix state plugin change handling
This commit is contained in:
parent
c0a3eb67ba
commit
6544191c78
2 changed files with 2 additions and 2 deletions
|
@ -120,7 +120,7 @@ public abstract class PluginBase {
|
|||
}
|
||||
} else { // disabling plugin
|
||||
if (state == State.ENABLED) {
|
||||
onStateChange(type, state, State.ENABLED);
|
||||
onStateChange(type, state, State.DISABLED);
|
||||
state = State.DISABLED;
|
||||
onStop();
|
||||
if (L.isEnabled(L.CORE))
|
||||
|
|
|
@ -67,7 +67,7 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
@Override
|
||||
public void onStateChange(PluginType type, State oldState, State newState) {
|
||||
// if pump profile was enabled need to switch to another too
|
||||
if (type == PluginType.PUMP && newState == State.ENABLED && newState == State.DISABLED && isProfileInterfaceEnabled) {
|
||||
if (type == PluginType.PUMP && newState == State.DISABLED && isProfileInterfaceEnabled) {
|
||||
setPluginEnabled(PluginType.PROFILE, false);
|
||||
NSProfilePlugin.getPlugin().setPluginEnabled(PluginType.PROFILE, true);
|
||||
NSProfilePlugin.getPlugin().setFragmentVisible(PluginType.PROFILE, true);
|
||||
|
|
Loading…
Reference in a new issue