fix barrier Toggle

This commit is contained in:
chrys 2018-07-07 16:26:41 +02:00
parent 96977c93a6
commit bddb67e634

View File

@ -16,8 +16,8 @@ class command():
return _('enables or disables the barrier mode')
def run(self):
self.env['runtime']['settingsManager'].setSetting('focus', 'barrier', str(not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'barrier')))
if self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'barrier'):
self.env['runtime']['settingsManager'].setSetting('barrier', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('barrier', 'enabled')))
if self.env['runtime']['settingsManager'].getSettingAsBool('barrier', 'enabled'):
self.env['runtime']['outputManager'].presentText(_("barrier mode enabled"), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(_("barrier mode disabled"), soundIcon='', interrupt=True)