Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
mayswind committed Oct 29, 2022
1 parent 5b476c4 commit 5a45203
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 33 deletions.
1 change: 0 additions & 1 deletion src/langs/zh_Hans.txt
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ Downloading Count=正在下载数量
Waiting Count=正在等待数量
Stopped Count=已停止数量
You have disabled notification in your browser. You should change your browser's settings before you enable this function.=您已经在浏览器中禁用通知功能. 如需使用此功能, 请修改您浏览器的设置.
Application cache has been updated, please reload the page for the changes to take effect.=应用缓存已经更新, 请重新加载页面使其生效.
Language resource has been updated, please reload the page for the changes to take effect.=语言资源已经更新, 请重新加载页面使其生效.
Configuration has been modified, please reload the page for the changes to take effect.=配置已经修改, 请重新加载页面使其生效.
Reload AriaNg=重新加载 AriaNg
Expand Down
1 change: 0 additions & 1 deletion src/langs/zh_Hant.txt
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ Downloading Count=正在下載數量
Waiting Count=正在等待數量
Stopped Count=已停止數量
You have disabled notification in your browser. You should change your browser's settings before you enable this function.=您已經在瀏覽器中停用通知功能. 如需使用此功能, 請修改您瀏覽器的設定.
Application cache has been updated, please reload the page for the changes to take effect.=應用快取已經更新, 請重新載入頁面使其生效.
Language resource has been updated, please reload the page for the changes to take effect.=語言資源已經更新, 請重新載入頁面使其生效.
Configuration has been modified, please reload the page for the changes to take effect.=配置已經修改, 請重新載入頁面使其生效.
Reload AriaNg=重新載入 AriaNg
Expand Down
1 change: 0 additions & 1 deletion src/scripts/config/defaultLanguage.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@
'Waiting Count': 'Waiting Count',
'Stopped Count': 'Stopped Count',
'You have disabled notification in your browser. You should change your browser\'s settings before you enable this function.': 'You have disabled notification in your browser. You should change your browser\'s settings before you enable this function.',
'Application cache has been updated, please reload the page for the changes to take effect.': 'Application cache has been updated, please reload the page for the changes to take effect.',
'Language resource has been updated, please reload the page for the changes to take effect.': 'Language resource has been updated, please reload the page for the changes to take effect.',
'Configuration has been modified, please reload the page for the changes to take effect.': 'Configuration has been modified, please reload the page for the changes to take effect.',
'Reload AriaNg': 'Reload AriaNg',
Expand Down
8 changes: 0 additions & 8 deletions src/scripts/core/root.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,14 +432,6 @@
}
}, true);

ariaNgSettingService.onApplicationCacheUpdated(function () {
ariaNgNotificationService.notifyInPage('', 'Application cache has been updated, please reload the page for the changes to take effect.', {
delay: false,
type: 'info',
templateUrl: 'views/notification-reloadable.html'
});
});

ariaNgSettingService.onFirstAccess(function () {
ariaNgNotificationService.notifyInPage('', 'Tap to configure and get started with AriaNg.', {
delay: false,
Expand Down
22 changes: 0 additions & 22 deletions src/scripts/services/ariaNgSettingService.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,18 @@
};
})();
var browserSupportStorage = browserFeatures.localStroage || browserFeatures.cookies;
var browserSupportAppCache = !!$window.applicationCache;
var browserSupportMatchMedia = !!$window.matchMedia;
var browserSupportDarkMode = browserSupportMatchMedia
&& $window.matchMedia('(prefers-color-scheme: dark)')
&& $window.matchMedia('(prefers-color-scheme: dark)').media !== 'not all'
&& angular.isFunction($window.matchMedia('(prefers-color-scheme: dark)').addEventListener);

var onAppCacheUpdatedCallbacks = [];
var onFirstVisitCallbacks = [];
var firstVisitCallbackFired = false;
var sessionSettings = {
debugMode: false
};

if (browserSupportAppCache) {
var appCache = $window.applicationCache;
appCache.addEventListener('updateready', function (e) {
for (var i = 0; i < onAppCacheUpdatedCallbacks.length; i++) {
var callback = onAppCacheUpdatedCallbacks[i];
callback();
}
}, false);
}

var fireFirstVisitEvent = function () {
if (!browserSupportStorage) {
return;
Expand Down Expand Up @@ -237,9 +225,6 @@
isBrowserSupportStorage: function () {
return browserSupportStorage;
},
isBrowserSupportApplicationCache: function () {
return browserSupportAppCache;
},
isBrowserSupportDarkMode: function () {
return browserSupportDarkMode;
},
Expand Down Expand Up @@ -689,13 +674,6 @@
resetSettings: function () {
clearAll();
},
onApplicationCacheUpdated: function (callback) {
if (!callback) {
return;
}

onAppCacheUpdatedCallbacks.push(callback);
},
onFirstAccess: function (callback) {
if (!callback) {
return;
Expand Down

0 comments on commit 5a45203

Please sign in to comment.