You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
comment removed and localStorage update moved up
Signed-off-by: Minhaz A V <minhazav@gmail.com>
This commit is contained in:
@ -132,8 +132,7 @@ var Notifier = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(enable) {
|
if (enable) {
|
||||||
// Case when we do not have the permission as 'granted'
|
|
||||||
// Attempt to get permission from user
|
// Attempt to get permission from user
|
||||||
global.Notification.requestPermission(function(result) {
|
global.Notification.requestPermission(function(result) {
|
||||||
if (result !== 'granted') {
|
if (result !== 'granted') {
|
||||||
@ -141,14 +140,15 @@ var Notifier = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (global.localStorage) {
|
||||||
|
global.localStorage.setItem('notifications_enabled', 'true');
|
||||||
|
}
|
||||||
|
|
||||||
if (callback) callback();
|
if (callback) callback();
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: "notifier_enabled",
|
action: "notifier_enabled",
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!global.localStorage) return;
|
|
||||||
global.localStorage.setItem('notifications_enabled', 'true');
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (!global.localStorage) return;
|
if (!global.localStorage) return;
|
||||||
|
Reference in New Issue
Block a user