fix switching to virtual pump
This commit is contained in:
parent
e08af1e7e4
commit
dc90c6b140
1 changed files with 4 additions and 2 deletions
|
@ -136,8 +136,10 @@ class ConfigBuilderPlugin @Inject constructor(
|
||||||
fun switchAllowed(changedPlugin: PluginBase, newState: Boolean, activity: FragmentActivity?, type: PluginType) {
|
fun switchAllowed(changedPlugin: PluginBase, newState: Boolean, activity: FragmentActivity?, type: PluginType) {
|
||||||
if (changedPlugin.getType() == PluginType.PUMP && changedPlugin.name != resourceHelper.gs(R.string.virtualpump))
|
if (changedPlugin.getType() == PluginType.PUMP && changedPlugin.name != resourceHelper.gs(R.string.virtualpump))
|
||||||
confirmPumpPluginActivation(changedPlugin, newState, activity, type)
|
confirmPumpPluginActivation(changedPlugin, newState, activity, type)
|
||||||
else if (changedPlugin.getType() == PluginType.PUMP) pumpSync.connectNewPump()
|
else if (changedPlugin.getType() == PluginType.PUMP) {
|
||||||
else performPluginSwitch(changedPlugin, newState, type)
|
performPluginSwitch(changedPlugin, newState, type)
|
||||||
|
pumpSync.connectNewPump()
|
||||||
|
} else performPluginSwitch(changedPlugin, newState, type)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun confirmPumpPluginActivation(changedPlugin: PluginBase, newState: Boolean, activity: FragmentActivity?, type: PluginType) {
|
private fun confirmPumpPluginActivation(changedPlugin: PluginBase, newState: Boolean, activity: FragmentActivity?, type: PluginType) {
|
||||||
|
|
Loading…
Reference in a new issue