Improved PUSH handling
This commit is contained in:
parent
eec130bd79
commit
5eb3d5344c
@ -1029,6 +1029,9 @@ angular.module('izhukov.utils', [])
|
|||||||
hidden = 'webkitHidden'
|
hidden = 'webkitHidden'
|
||||||
visibilityChange = 'webkitvisibilitychange'
|
visibilityChange = 'webkitvisibilitychange'
|
||||||
}
|
}
|
||||||
|
if (!Config.Mobile) {
|
||||||
|
visibilityChange = ''
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
start: start
|
start: start
|
||||||
|
@ -833,7 +833,7 @@ auth.resendCode#3ef1a9bf phone_number:string phone_code_hash:string = auth.SentC
|
|||||||
auth.cancelCode#1f040578 phone_number:string phone_code_hash:string = Bool;
|
auth.cancelCode#1f040578 phone_number:string phone_code_hash:string = Bool;
|
||||||
auth.dropTempAuthKeys#8e48a188 except_auth_keys:Vector<long> = Bool;
|
auth.dropTempAuthKeys#8e48a188 except_auth_keys:Vector<long> = Bool;
|
||||||
|
|
||||||
account.registerDevice#f75874d1 token_type:int token:string other_uids:Vector<int> = Bool;
|
account.registerDevice#01280460 token_type:int token:string app_sandbox:Bool other_uids:Vector<int> = Bool;
|
||||||
account.unregisterDevice#3076c4bf token_type:int token:string other_uids:Vector<int> = Bool;
|
account.unregisterDevice#3076c4bf token_type:int token:string other_uids:Vector<int> = Bool;
|
||||||
account.updateNotifySettings#84be5b93 peer:InputNotifyPeer settings:InputPeerNotifySettings = Bool;
|
account.updateNotifySettings#84be5b93 peer:InputNotifyPeer settings:InputPeerNotifySettings = Bool;
|
||||||
account.getNotifySettings#12b3ad31 peer:InputNotifyPeer = PeerNotifySettings;
|
account.getNotifySettings#12b3ad31 peer:InputNotifyPeer = PeerNotifySettings;
|
||||||
|
@ -3398,6 +3398,8 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
$rootScope.$broadcast('stateSynchronized')
|
$rootScope.$broadcast('stateSynchronized')
|
||||||
updatesState.syncLoading = false
|
updatesState.syncLoading = false
|
||||||
}
|
}
|
||||||
|
}, function () {
|
||||||
|
updatesState.syncLoading = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4083,6 +4085,14 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
|
|
||||||
if ('Notification' in window) {
|
if ('Notification' in window) {
|
||||||
try {
|
try {
|
||||||
|
if (data.tag) {
|
||||||
|
angular.forEach(notificationsShown, function (notification) {
|
||||||
|
if (notification &&
|
||||||
|
notification.tag == data.tag) {
|
||||||
|
notification.hidden = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
notification = new Notification(data.title, {
|
notification = new Notification(data.title, {
|
||||||
icon: data.image || '',
|
icon: data.image || '',
|
||||||
body: data.message || '',
|
body: data.message || '',
|
||||||
@ -4160,6 +4170,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (notification.close) {
|
if (notification.close) {
|
||||||
|
notification.hidden = true
|
||||||
notification.close()
|
notification.close()
|
||||||
}
|
}
|
||||||
else if (notificationsMsSiteMode &&
|
else if (notificationsMsSiteMode &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user