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
|
} else { // disabling plugin
|
||||||
if (state == State.ENABLED) {
|
if (state == State.ENABLED) {
|
||||||
onStateChange(type, state, State.ENABLED);
|
onStateChange(type, state, State.DISABLED);
|
||||||
state = State.DISABLED;
|
state = State.DISABLED;
|
||||||
onStop();
|
onStop();
|
||||||
if (L.isEnabled(L.CORE))
|
if (L.isEnabled(L.CORE))
|
||||||
|
|
|
@ -67,7 +67,7 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
||||||
@Override
|
@Override
|
||||||
public void onStateChange(PluginType type, State oldState, State newState) {
|
public void onStateChange(PluginType type, State oldState, State newState) {
|
||||||
// if pump profile was enabled need to switch to another too
|
// 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);
|
setPluginEnabled(PluginType.PROFILE, false);
|
||||||
NSProfilePlugin.getPlugin().setPluginEnabled(PluginType.PROFILE, true);
|
NSProfilePlugin.getPlugin().setPluginEnabled(PluginType.PROFILE, true);
|
||||||
NSProfilePlugin.getPlugin().setFragmentVisible(PluginType.PROFILE, true);
|
NSProfilePlugin.getPlugin().setFragmentVisible(PluginType.PROFILE, true);
|
||||||
|
|
Loading…
Reference in a new issue