added logic for stranger notification setting
made page content refreshes happen on visibility
This commit is contained in:
parent
7bedae48a4
commit
4cd2302bc9
@ -12,7 +12,6 @@
|
||||
* make node "speed" setting such as when ui is open to reduce bandwidth usage
|
||||
* localization support
|
||||
|
||||
* add mark read in mail
|
||||
* add BCC support to mail
|
||||
|
||||
|
||||
|
@ -76,4 +76,7 @@ def on_processblocks(api, data=None):
|
||||
if data['block'].decrypted:
|
||||
config.reload()
|
||||
if config.get('mail.notificationSetting', True):
|
||||
if not config.get('mail.strangersNotification', True):
|
||||
if not user.isFriend():
|
||||
return
|
||||
notifier.notification_with_sound(title="Onionr Mail - New Message", message="From: %s\n\nSubject: %s" % (signer, metadata['subject']))
|
||||
|
@ -34,4 +34,11 @@ function setupInterval(){
|
||||
var refreshInterval = setInterval(autoRefresh, 3000)
|
||||
setupInterval()
|
||||
|
||||
checkbox.onchange = function(){setupInterval}
|
||||
checkbox.onchange = function(){setupInterval}
|
||||
|
||||
|
||||
document.addEventListener("visibilitychange", function() {
|
||||
if (document.visibilityState === 'visible') {
|
||||
autoRefresh()
|
||||
}
|
||||
})
|
||||
|
@ -441,4 +441,10 @@ setActiveTab('inbox')
|
||||
setInterval(function(){mailPing()}, 10000)
|
||||
mailPing()
|
||||
window.inboxInterval = setInterval(function(){refreshPms(true)}, 3000)
|
||||
refreshPms(true)
|
||||
refreshPms(true)
|
||||
|
||||
document.addEventListener("visibilitychange", function() {
|
||||
if (document.visibilityState === 'visible') {
|
||||
refreshPms()
|
||||
}
|
||||
})
|
||||
|
@ -136,5 +136,11 @@ var getStats = function(){
|
||||
})
|
||||
}
|
||||
|
||||
document.addEventListener("visibilitychange", function() {
|
||||
if (document.visibilityState === 'visible') {
|
||||
getStats()
|
||||
}
|
||||
})
|
||||
|
||||
getStats()
|
||||
setInterval(function(){getStats()}, 10000)
|
||||
setInterval(function(){getStats()}, 1000)
|
Loading…
Reference in New Issue
Block a user