mirror of
https://github.com/moparisthebest/mail
synced 2024-12-22 07:18:49 -05:00
Merge pull request #142 from whiteout-io/dev/WO-639
[WO-639] Use 5s timeout for incoming mail
This commit is contained in:
commit
a610440b5a
@ -213,5 +213,7 @@ exports.string = {
|
||||
connDocHostTimeout: 'We could not establish a connection to {0} within {1} ms. Please check the server settings and encryption mode!',
|
||||
connDocAuthRejected: 'Your credentials for {0} were rejected. Please check your username and password!',
|
||||
connDocNoInbox: 'We could not detect an IMAP inbox folder on {0}. Please have a look at the FAQ for information on how to fix this error.',
|
||||
connDocGenericError: 'There was an error connecting to {0}: {1}'
|
||||
connDocGenericError: 'There was an error connecting to {0}: {1}',
|
||||
logoutTitle: 'Logout',
|
||||
logoutMessage: 'Are you sure you want to logout?'
|
||||
};
|
@ -4,9 +4,14 @@ var appController = require('../app-controller'),
|
||||
notification = require('../util/notification'),
|
||||
emailDao, outboxBo, keychainDao, searchTimeout, firstSelect;
|
||||
|
||||
//
|
||||
// Constants
|
||||
//
|
||||
|
||||
var INIT_DISPLAY_LEN = 20,
|
||||
SCROLL_DISPLAY_LEN = 10,
|
||||
FOLDER_TYPE_INBOX = 'Inbox';
|
||||
FOLDER_TYPE_INBOX = 'Inbox',
|
||||
NOTIFICATION_INBOX_TIMEOUT = 5000;
|
||||
|
||||
var MailListCtrl = function($scope, $routeParams) {
|
||||
//
|
||||
@ -409,7 +414,8 @@ var MailListCtrl = function($scope, $routeParams) {
|
||||
$scope.select(_.findWhere(currentFolder().messages, {
|
||||
uid: unreadMsgs[0].uid
|
||||
}));
|
||||
}
|
||||
},
|
||||
timeout: NOTIFICATION_INBOX_TIMEOUT
|
||||
});
|
||||
$scope.pendingNotifications.push(note);
|
||||
};
|
||||
|
@ -1,11 +1,20 @@
|
||||
'use strict';
|
||||
|
||||
var appController = require('../app-controller'),
|
||||
config = require('../app-config').config,
|
||||
notification = require('../util/notification'),
|
||||
backBtnHandler = require('../util/backbutton-handler'),
|
||||
appCfg = require('../app-config'),
|
||||
config = appCfg.config,
|
||||
str = appCfg.string,
|
||||
emailDao, outboxBo;
|
||||
|
||||
//
|
||||
// Constants
|
||||
//
|
||||
|
||||
var NOTIFICATION_SENT_TIMEOUT = 2000;
|
||||
|
||||
|
||||
//
|
||||
// Controller
|
||||
//
|
||||
@ -55,8 +64,8 @@ var NavigationCtrl = function($scope, $routeParams, $location) {
|
||||
|
||||
$scope.logout = function() {
|
||||
$scope.onError({
|
||||
title: 'Logout',
|
||||
message: 'Are you sure you want to logout?',
|
||||
title: str.logoutTitle,
|
||||
message: str.logoutMessage,
|
||||
callback: function(confirm) {
|
||||
if (confirm) {
|
||||
appController.logout();
|
||||
@ -118,7 +127,7 @@ var NavigationCtrl = function($scope, $routeParams, $location) {
|
||||
notification.create({
|
||||
title: 'Message sent',
|
||||
message: email.subject,
|
||||
timeout: 2000
|
||||
timeout: NOTIFICATION_SENT_TIMEOUT
|
||||
}, function() {});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user