1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-23 18:02:15 -05:00

Split out "tempfail" and "permfail" message deliver errors

This commit is contained in:
Jesse Vincent 2011-03-09 22:41:09 -05:00
parent c305397d05
commit d80a941dba

View File

@ -2889,11 +2889,17 @@ public class MessagingController implements Runnable {
notifMgr.notify(K9.FETCHING_EMAIL_NOTIFICATION - account.getAccountNumber(), notif);
}
private void notifySendFailed(Account account, Exception lastFailure) {
private void notifySendTempFailed(Account account, Exception lastFailure) {
notifySendFailed(account, lastFailure, account.getOutboxFolderName());
}
private void notifySendPermFailed(Account account, Exception lastFailure) {
notifySendFailed(account, lastFailure, account.getDraftsFolderName());
}
private void notifySendFailed(Account account, Exception lastFailure, String openFolder) {
NotificationManager notifMgr = (NotificationManager)mApplication.getSystemService(Context.NOTIFICATION_SERVICE);
Notification notif = new Notification(R.drawable.stat_notify_email_generic, mApplication.getString(R.string.send_failure_subject), System.currentTimeMillis());
Intent i = FolderList.actionHandleNotification(mApplication, account, account.getOutboxFolderName());
Intent i = FolderList.actionHandleNotification(mApplication, account, openFolder);
PendingIntent pi = PendingIntent.getActivity(mApplication, 0, i, 0);