Actually reenable mqtt play when user says to

This commit is contained in:
Eric House 2022-05-14 06:00:33 -07:00
parent 7f401ce809
commit a04c33fe89
3 changed files with 7 additions and 0 deletions

View file

@ -1001,6 +1001,7 @@ public class BoardDelegate extends DelegateBase
JNICmd cmd = null;
switch ( action ) {
case ENABLE_MQTT_DO_OR:
XWPrefs.setMQTTEnabled( m_activity, true );
MQTTUtils.setEnabled( m_activity, true );
break;
case UNDO_LAST_ACTION:

View file

@ -794,6 +794,7 @@ public abstract class DelegateBase implements DlgClickNotify,
BTUtils.enable( m_activity );
break;
case ENABLE_MQTT_DO:
XWPrefs.setMQTTEnabled( m_activity, true );
MQTTUtils.setEnabled( m_activity, true );
break;
case PERMS_QUERY:

View file

@ -106,6 +106,11 @@ public class XWPrefs {
return enabled;
}
public static void setMQTTEnabled( Context context, boolean enabled )
{
setPrefsBoolean( context, R.string.key_disable_mqtt, !enabled );
}
public static boolean getBTDisabled( Context context )
{
boolean disabled = getPrefsBoolean( context, R.string.key_disable_bt,