added notification config option

master
Kevin Froman 2019-09-29 15:52:34 -05:00
parent 1ca0402660
commit 6d515f7a60
2 changed files with 6 additions and 1 deletions

View File

@ -24,6 +24,10 @@ except ImportError:
else: else:
notifications_enabled = True notifications_enabled = True
import config
if not config.get('general.show_notifications', True): notifications_enabled = False
def notify(title: str = "Onionr", message: str = ""): def notify(title: str = "Onionr", message: str = ""):
"""cross platform method to show a notification""" """cross platform method to show a notification"""
if not notifications_enabled: return if not notifications_enabled: return

View File

@ -14,7 +14,8 @@
"public_key": "", "public_key": "",
"random_bind_ip": false, "random_bind_ip": false,
"use_bootstrap_list": true, "use_bootstrap_list": true,
"store_plaintext_blocks": true "store_plaintext_blocks": true,
"show_notifications": true
}, },
"plugins": { "plugins": {