summaryrefslogtreecommitdiff
path: root/src/tabs/rostertab.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/tabs/rostertab.py')
-rw-r--r--src/tabs/rostertab.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/tabs/rostertab.py b/src/tabs/rostertab.py
index 22cad8b9..199be8f7 100644
--- a/src/tabs/rostertab.py
+++ b/src/tabs/rostertab.py
@@ -728,10 +728,8 @@ class RosterInfoTab(Tab):
Show or hide offline contacts
"""
option = 'roster_show_offline'
- if config.get(option, 'false') == 'false':
- success = config.silent_set(option, 'true')
- else:
- success = config.silent_set(option, 'false')
+ value = config.get(option, False)
+ success = config.silent_set(option, not value)
roster.modified()
if not success:
self.core.information(_('Unable to write in the config file'), 'Error')