mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 03:36:07 +03:00
promise -> callback & setToolbarPersistantHidden moved inline
Signed-off-by: Minhaz A V <minhazav@gmail.com>
This commit is contained in:
parent
349b472056
commit
9b5519e866
1 changed files with 3 additions and 9 deletions
|
@ -159,7 +159,7 @@ var Notifier = {
|
||||||
if (this.isPermissionDefault()) {
|
if (this.isPermissionDefault()) {
|
||||||
// Attempt to get permission from user
|
// Attempt to get permission from user
|
||||||
var self = this;
|
var self = this;
|
||||||
global.Notification.requestPermission().then(function(result) {
|
global.Notification.requestPermission(function(result) {
|
||||||
if (result === 'denied') {
|
if (result === 'denied') {
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: "notifier_enabled",
|
action: "notifier_enabled",
|
||||||
|
@ -225,14 +225,8 @@ var Notifier = {
|
||||||
value: this.isEnabled()
|
value: this.isEnabled()
|
||||||
});
|
});
|
||||||
|
|
||||||
if (persistent) {
|
// update the info to localStorage for persistent settings
|
||||||
this.setToolbarPersistantHidden();
|
if (persistent && global.localStorage) {
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
setToolbarPersistantHidden: function() {
|
|
||||||
// update the info to localStorage
|
|
||||||
if (global.localStorage) {
|
|
||||||
global.localStorage.setItem('notifications_hidden', 'true');
|
global.localStorage.setItem('notifications_hidden', 'true');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue