diff --git a/app/js/lib/mtproto_wrapper.js b/app/js/lib/mtproto_wrapper.js index 6a21fcfe..4dda4a3b 100644 --- a/app/js/lib/mtproto_wrapper.js +++ b/app/js/lib/mtproto_wrapper.js @@ -629,7 +629,7 @@ angular.module('izhukov.mtproto.wrapper', ['izhukov.utils', 'izhukov.mtproto']) var errorShowTime = 0; function start() { - if (!started) { + if (!started && !Config.Navigator.mobile) { started = true; IdleManager.start(); diff --git a/app/js/services.js b/app/js/services.js index 5b1d3a5e..ee36843b 100644 --- a/app/js/services.js +++ b/app/js/services.js @@ -3393,32 +3393,35 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) var titleBackup = document.title, titlePromise; - $rootScope.$watch('idle.isIDLE', function (newVal) { - // console.log('isIDLE watch', newVal); - $interval.cancel(titlePromise); - - if (!newVal) { - document.title = titleBackup; - $('link[rel="icon"]:first').replaceWith(faviconBackupEl); - notificationsClear(); - } else { - titleBackup = document.title; - - titlePromise = $interval(function () { - var time = tsNow(); - if (!notificationsCount || time % 2000 > 1000) { + $rootScope.$watch('idle.isIDLE', function (newVal) { + if (!newVal) { + notificationsClear(); + } + if (!Config.Navigator.mobile) { + $interval.cancel(titlePromise); + if (!newVal) { document.title = titleBackup; - var curFav = $('link[rel="icon"]:first'); - if (curFav.attr('href').indexOf('favicon_unread') != -1) { - curFav.replaceWith(faviconBackupEl); - } + $('link[rel="icon"]:first').replaceWith(faviconBackupEl); } else { - document.title = langNotificationsPluralize(notificationsCount); - $('link[rel="icon"]:first').replaceWith(faviconNewEl); + titleBackup = document.title; + + titlePromise = $interval(function () { + var time = tsNow(); + if (!notificationsCount || time % 2000 > 1000) { + document.title = titleBackup; + var curFav = $('link[rel="icon"]:first'); + if (curFav.attr('href').indexOf('favicon_unread') != -1) { + curFav.replaceWith(faviconBackupEl); + } + } else { + document.title = langNotificationsPluralize(notificationsCount); + $('link[rel="icon"]:first').replaceWith(faviconNewEl); + } + }, 1000); } - }, 1000); - } - }); + } + }); + } $rootScope.$on('apiUpdate', function (e, update) { // console.log('on apiUpdate', update);