fix sometimes popping up the first access tip multiple times
This commit is contained in:
parent
24dc426541
commit
7d804424ab
|
@ -3,12 +3,13 @@
|
||||||
|
|
||||||
angular.module('ariaNg').factory('ariaNgSettingService', ['$window', '$location', '$filter', '$translate', 'base64', 'amMoment', 'localStorageService', 'ariaNgConstants', 'ariaNgDefaultOptions', 'ariaNgLanguages', 'ariaNgCommonService', function ($window, $location, $filter, $translate, base64, amMoment, localStorageService, ariaNgConstants, ariaNgDefaultOptions, ariaNgLanguages, ariaNgCommonService) {
|
angular.module('ariaNg').factory('ariaNgSettingService', ['$window', '$location', '$filter', '$translate', 'base64', 'amMoment', 'localStorageService', 'ariaNgConstants', 'ariaNgDefaultOptions', 'ariaNgLanguages', 'ariaNgCommonService', function ($window, $location, $filter, $translate, base64, amMoment, localStorageService, ariaNgConstants, ariaNgDefaultOptions, ariaNgLanguages, ariaNgCommonService) {
|
||||||
var onFirstVisitCallbacks = [];
|
var onFirstVisitCallbacks = [];
|
||||||
|
var firstVisitCallbackfired = false;
|
||||||
var sessionSettings = {
|
var sessionSettings = {
|
||||||
debugMode: false
|
debugMode: false
|
||||||
};
|
};
|
||||||
|
|
||||||
var fireFirstVisitEvent = function () {
|
var fireFirstVisitEvent = function () {
|
||||||
if (!angular.isArray(onFirstVisitCallbacks) || onFirstVisitCallbacks.length < 1) {
|
if (firstVisitCallbackfired || !angular.isArray(onFirstVisitCallbacks) || onFirstVisitCallbacks.length < 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +17,8 @@
|
||||||
var callback = onFirstVisitCallbacks[i];
|
var callback = onFirstVisitCallbacks[i];
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
firstVisitCallbackfired = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
var isInsecureProtocolDisabled = function () {
|
var isInsecureProtocolDisabled = function () {
|
||||||
|
|
Reference in a new issue