Do not fire UIOffline when navigating away

Fixes #487
This commit is contained in:
Audrius Butkevicius 2014-08-19 23:43:30 +01:00
parent 997b20a975
commit db54dca694
2 changed files with 5 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -25,6 +25,10 @@ syncthing.controller('EventCtrl', function ($scope, $http) {
var online = false; var online = false;
var lastID = 0; var lastID = 0;
$(window).bind('beforeunload', function() {
online = false;
});
var successFn = function (data) { var successFn = function (data) {
if (!online) { if (!online) {
$scope.$emit('UIOnline'); $scope.$emit('UIOnline');