Merge pull request #156 from nextcloud/dont-close-notification-programmatically

don't close the mail notifcation programmatically
This commit is contained in:
Christoph Wurst 2016-11-17 20:14:20 +01:00 коммит произвёл GitHub
Родитель bbca23bef7 50d7f27c22
Коммит af94755614
2 изменённых файлов: 0 добавлений и 20 удалений

Просмотреть файл

@ -92,22 +92,5 @@ define([
expect(Radio.navigation.trigger).not.toHaveBeenCalled();
expect(notification.onclick).not.toBe(undefined);
});
it('should close the notification after 5 seconds', function() {
window.Notification = getNotificationMock();
spyOn(Radio.navigation, 'trigger');
NotificationHandler.showNotification('a', 'b');
// A new notification should have been created
expect(notification).not.toBe(undefined);
spyOn(notification, 'close');
expect(notification.close).not.toHaveBeenCalled();
jasmine.clock().tick(2000);
expect(notification.close).not.toHaveBeenCalled();
jasmine.clock().tick(3100);
expect(notification.close).toHaveBeenCalled();
});
});
});

Просмотреть файл

@ -58,9 +58,6 @@ define(function(require) {
Radio.navigation.trigger('folder', account.get('accountId'), folder.get('id'), false);
window.focus();
};
setTimeout(function() {
notification.close();
}, 5000);
}
function showMailNotification(email, folder) {