1
0
mirror of https://github.com/nextcloud/ocsms.git synced 2026-08-20 21:03:05 +00:00

replace setInterval by angular

This commit is contained in:
Loic Blot
2015-06-25 19:25:26 +00:00
parent 90144ea042
commit 1f72ebf40f
+5 -4
View File
@@ -34,8 +34,8 @@ function arrayUnique(arr) {
return unq; return unq;
} }
app.controller('OcSmsController', ['$scope', '$timeout', app.controller('OcSmsController', ['$scope', '$interval', '$timeout',
function ($scope, $timeout) { function ($scope, $interval, $timeout) {
$scope.buttons = [ $scope.buttons = [
{text: "Send"} {text: "Send"}
]; ];
@@ -74,6 +74,9 @@ app.controller('OcSmsController', ['$scope', '$timeout',
}); });
}; };
$interval(refreshConversation, 10000);
$interval(checkNewMessages, 10000);
$timeout(function () { $timeout(function () {
// Register real title // Register real title
g_originalTitle = document.title; g_originalTitle = document.title;
@@ -100,8 +103,6 @@ app.controller('OcSmsController', ['$scope', '$timeout',
}); });
fetchInitialSettings(); fetchInitialSettings();
initDesktopNotifies(); initDesktopNotifies();
setInterval(refreshConversation, 10000);
setInterval(checkNewMessages, 10000);
}); });
} }
]); ]);