Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
package com.fsck.k9.activity;
|
|
|
|
|
2010-02-08 22:26:40 -05:00
|
|
|
import java.text.DateFormat;
|
|
|
|
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
import android.content.Context;
|
|
|
|
|
|
|
|
import com.fsck.k9.Account;
|
2011-02-13 19:53:50 -05:00
|
|
|
import com.fsck.k9.AccountStats;
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
import com.fsck.k9.R;
|
2010-05-19 14:17:06 -04:00
|
|
|
import com.fsck.k9.controller.MessagingListener;
|
2010-02-08 22:26:40 -05:00
|
|
|
import com.fsck.k9.service.MailService;
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
|
2011-02-06 17:09:48 -05:00
|
|
|
public class ActivityListener extends MessagingListener {
|
2011-02-19 22:47:28 -05:00
|
|
|
private Account mAccount = null;
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
private String mLoadingFolderName = null;
|
2010-07-13 19:59:14 -04:00
|
|
|
private String mLoadingHeaderFolderName = null;
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
private String mLoadingAccountDescription = null;
|
|
|
|
private String mSendingAccountDescription = null;
|
|
|
|
private int mFolderCompleted = 0;
|
|
|
|
private int mFolderTotal = 0;
|
|
|
|
private String mProcessingAccountDescription = null;
|
|
|
|
private String mProcessingCommandTitle = null;
|
2009-12-20 00:41:43 -05:00
|
|
|
|
2010-07-13 19:59:14 -04:00
|
|
|
|
2011-02-06 17:09:48 -05:00
|
|
|
public String formatHeader(Context context, String activityPrefix, int unreadMessageCount, DateFormat timeFormat) {
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
String operation = null;
|
|
|
|
String progress = null;
|
2010-07-13 19:59:14 -04:00
|
|
|
if (mLoadingAccountDescription != null
|
|
|
|
|| mSendingAccountDescription != null
|
|
|
|
|| mLoadingHeaderFolderName != null
|
2011-02-06 17:09:48 -05:00
|
|
|
|| mProcessingAccountDescription != null) {
|
2010-07-13 19:59:14 -04:00
|
|
|
progress = (mFolderTotal > 0 ?
|
|
|
|
context.getString(R.string.folder_progress, mFolderCompleted, mFolderTotal) : "");
|
2009-12-20 00:41:43 -05:00
|
|
|
|
2011-02-06 17:09:48 -05:00
|
|
|
if (mLoadingFolderName != null || mLoadingHeaderFolderName != null) {
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
String displayName = mLoadingFolderName;
|
2011-06-01 16:03:56 -04:00
|
|
|
if ((mAccount != null) && (mAccount.getInboxFolderName() != null) && mAccount.getInboxFolderName().equalsIgnoreCase(displayName)) {
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
displayName = context.getString(R.string.special_mailbox_name_inbox);
|
2011-03-22 03:07:32 -04:00
|
|
|
} else if ((mAccount != null) && mAccount.getOutboxFolderName().equals(displayName)) {
|
2011-02-19 22:47:28 -05:00
|
|
|
displayName = context.getString(R.string.special_mailbox_name_outbox);
|
|
|
|
}
|
2010-07-13 19:59:14 -04:00
|
|
|
|
2011-02-06 17:09:48 -05:00
|
|
|
if (mLoadingHeaderFolderName != null) {
|
2010-07-13 19:59:14 -04:00
|
|
|
|
|
|
|
operation = context.getString(R.string.status_loading_account_folder_headers, mLoadingAccountDescription, displayName, progress);
|
2011-02-06 17:09:48 -05:00
|
|
|
} else {
|
2010-07-13 19:59:14 -04:00
|
|
|
operation = context.getString(R.string.status_loading_account_folder, mLoadingAccountDescription, displayName, progress);
|
|
|
|
}
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
}
|
2009-12-20 00:41:43 -05:00
|
|
|
|
2011-02-06 17:09:48 -05:00
|
|
|
else if (mSendingAccountDescription != null) {
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
operation = context.getString(R.string.status_sending_account, mSendingAccountDescription, progress);
|
2011-02-06 17:09:48 -05:00
|
|
|
} else if (mProcessingAccountDescription != null) {
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
operation = context.getString(R.string.status_processing_account, mProcessingAccountDescription,
|
2009-12-20 00:41:43 -05:00
|
|
|
mProcessingCommandTitle != null ? mProcessingCommandTitle : "",
|
|
|
|
progress);
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
}
|
2011-02-06 17:09:48 -05:00
|
|
|
} else {
|
2010-02-08 22:26:40 -05:00
|
|
|
long nextPollTime = MailService.getNextPollTime();
|
2011-02-06 17:09:48 -05:00
|
|
|
if (nextPollTime != -1) {
|
2010-02-08 22:26:40 -05:00
|
|
|
operation = context.getString(R.string.status_next_poll, timeFormat.format(nextPollTime));
|
2011-02-06 17:09:48 -05:00
|
|
|
} else if (MailService.isSyncDisabled()) {
|
Display a message in the titlebar when K-9 Mail is not performing any message synchronization. This state will happen when no network is available, when background ops/background data/auto-sync settings turn off synchronization, or when no account is set for polling or pushing.
This revision respects the intention of r3011 that when K-9 Mail is
set for pushing only no message is displayed, as that condition is a
normal state. However, it provides valuable feedback in other cases
that synchronization is off-line, as was done in r1433.
Although the case when the user has intentionally set no account for
polling or pushing can be considered "normal" and therefore unworthy
of a message, it turns out to be a significant burden to detect that
situation when the network is offline, since we normally do not even
try to figure out the account configurations in that case. Therefore,
without making substantial, otherwise unwarranted, changes to
MailService.java, "Syncing off" would be displayed sometimes to such a
user, and sometimes not. Since it is presumably a rare case, and
there is minimal harm to display the "Syncing off" message, the
message will be consistently displayed when no account is set for
polling or pushing.
Note to translators:
"Syncing off" is different than "Polling off". The new phrase "Syncing
off" means that K-9 Mail is not performing any synchronization with
any mail server. The prior non-English phrases for "Polling off" are
currently in-place as translations for "Syncing off", as it seems that
the meanings are close enough that it would be better to show the
obsolete translations that to fallback to the English "Syncing off".
However, better translations of "Syncing off" would be welcome.
2011-02-04 03:26:16 -05:00
|
|
|
operation = context.getString(R.string.status_syncing_off);
|
2011-02-06 17:09:48 -05:00
|
|
|
} else {
|
Display a message in the titlebar when K-9 Mail is not performing any message synchronization. This state will happen when no network is available, when background ops/background data/auto-sync settings turn off synchronization, or when no account is set for polling or pushing.
This revision respects the intention of r3011 that when K-9 Mail is
set for pushing only no message is displayed, as that condition is a
normal state. However, it provides valuable feedback in other cases
that synchronization is off-line, as was done in r1433.
Although the case when the user has intentionally set no account for
polling or pushing can be considered "normal" and therefore unworthy
of a message, it turns out to be a significant burden to detect that
situation when the network is offline, since we normally do not even
try to figure out the account configurations in that case. Therefore,
without making substantial, otherwise unwarranted, changes to
MailService.java, "Syncing off" would be displayed sometimes to such a
user, and sometimes not. Since it is presumably a rare case, and
there is minimal harm to display the "Syncing off" message, the
message will be consistently displayed when no account is set for
polling or pushing.
Note to translators:
"Syncing off" is different than "Polling off". The new phrase "Syncing
off" means that K-9 Mail is not performing any synchronization with
any mail server. The prior non-English phrases for "Polling off" are
currently in-place as translations for "Syncing off", as it seems that
the meanings are close enough that it would be better to show the
obsolete translations that to fallback to the English "Syncing off".
However, better translations of "Syncing off" would be welcome.
2011-02-04 03:26:16 -05:00
|
|
|
operation = "";
|
2010-02-08 22:26:40 -05:00
|
|
|
}
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
}
|
2009-12-20 00:41:43 -05:00
|
|
|
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
return context.getString(R.string.activity_header_format, activityPrefix,
|
2009-12-20 00:41:43 -05:00
|
|
|
(unreadMessageCount > 0 ? context.getString(R.string.activity_unread_count, unreadMessageCount) : ""),
|
|
|
|
operation);
|
|
|
|
|
|
|
|
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
}
|
2009-12-20 00:41:43 -05:00
|
|
|
|
2011-02-13 19:53:50 -05:00
|
|
|
public void informUserOfStatus() {
|
|
|
|
}
|
|
|
|
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
@Override
|
|
|
|
public void synchronizeMailboxFinished(
|
|
|
|
Account account,
|
|
|
|
String folder,
|
|
|
|
int totalMessagesInMailbox,
|
2011-02-06 17:09:48 -05:00
|
|
|
int numNewMessages) {
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
mLoadingAccountDescription = null;
|
|
|
|
mLoadingFolderName = null;
|
2011-02-19 22:47:28 -05:00
|
|
|
mAccount = null;
|
2011-02-13 19:53:50 -05:00
|
|
|
informUserOfStatus();
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public void synchronizeMailboxStarted(Account account, String folder) {
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
mLoadingAccountDescription = account.getDescription();
|
|
|
|
mLoadingFolderName = folder;
|
2011-02-19 22:47:28 -05:00
|
|
|
mAccount = account;
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
mFolderCompleted = 0;
|
|
|
|
mFolderTotal = 0;
|
2011-02-13 19:53:50 -05:00
|
|
|
informUserOfStatus();
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
}
|
2009-12-20 00:41:43 -05:00
|
|
|
|
2010-07-13 19:59:14 -04:00
|
|
|
|
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public void synchronizeMailboxHeadersStarted(Account account, String folder) {
|
2010-07-13 19:59:14 -04:00
|
|
|
mLoadingHeaderFolderName = folder;
|
2011-02-13 19:53:50 -05:00
|
|
|
informUserOfStatus();
|
2010-07-13 19:59:14 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public void synchronizeMailboxHeadersProgress(Account account, String folder, int completed, int total) {
|
2010-07-13 19:59:14 -04:00
|
|
|
mFolderCompleted = completed;
|
|
|
|
mFolderTotal = total;
|
2011-02-13 19:53:50 -05:00
|
|
|
informUserOfStatus();
|
2010-07-13 19:59:14 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void synchronizeMailboxHeadersFinished(Account account, String folder,
|
2011-02-06 17:09:48 -05:00
|
|
|
int total, int completed) {
|
2010-07-13 19:59:14 -04:00
|
|
|
mLoadingHeaderFolderName = null;
|
2010-07-14 23:42:20 -04:00
|
|
|
mFolderCompleted = 0;
|
|
|
|
mFolderTotal = 0;
|
2011-02-13 19:53:50 -05:00
|
|
|
informUserOfStatus();
|
2010-07-13 19:59:14 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-04-16 08:20:10 -04:00
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public void synchronizeMailboxProgress(Account account, String folder, int completed, int total) {
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
mFolderCompleted = completed;
|
|
|
|
mFolderTotal = total;
|
2011-02-13 19:53:50 -05:00
|
|
|
informUserOfStatus();
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void synchronizeMailboxFailed(Account account, String folder,
|
2011-02-06 17:09:48 -05:00
|
|
|
String message) {
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
mLoadingAccountDescription = null;
|
|
|
|
mLoadingFolderName = null;
|
2011-02-19 22:47:28 -05:00
|
|
|
mAccount = null;
|
2011-02-13 19:53:50 -05:00
|
|
|
informUserOfStatus();
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
|
|
|
|
}
|
2009-12-20 00:41:43 -05:00
|
|
|
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public void sendPendingMessagesStarted(Account account) {
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
mSendingAccountDescription = account.getDescription();
|
2011-02-13 19:53:50 -05:00
|
|
|
informUserOfStatus();
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
}
|
2009-12-20 00:41:43 -05:00
|
|
|
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public void sendPendingMessagesCompleted(Account account) {
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
mSendingAccountDescription = null;
|
2011-02-13 19:53:50 -05:00
|
|
|
informUserOfStatus();
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public void sendPendingMessagesFailed(Account account) {
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
mSendingAccountDescription = null;
|
2011-02-13 19:53:50 -05:00
|
|
|
informUserOfStatus();
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
}
|
2010-04-16 08:20:10 -04:00
|
|
|
|
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public void pendingCommandsProcessing(Account account) {
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
mProcessingAccountDescription = account.getDescription();
|
|
|
|
mFolderCompleted = 0;
|
|
|
|
mFolderTotal = 0;
|
2011-02-13 19:53:50 -05:00
|
|
|
informUserOfStatus();
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
}
|
2010-04-16 08:20:10 -04:00
|
|
|
|
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public void pendingCommandsFinished(Account account) {
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
mProcessingAccountDescription = null;
|
2011-02-13 19:53:50 -05:00
|
|
|
informUserOfStatus();
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
}
|
2010-04-16 08:20:10 -04:00
|
|
|
|
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public void pendingCommandStarted(Account account, String commandTitle) {
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
mProcessingCommandTitle = commandTitle;
|
2011-02-13 19:53:50 -05:00
|
|
|
informUserOfStatus();
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
}
|
2009-12-20 00:41:43 -05:00
|
|
|
|
2010-04-16 08:20:10 -04:00
|
|
|
@Override
|
2011-02-06 17:09:48 -05:00
|
|
|
public void pendingCommandCompleted(Account account, String commandTitle) {
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
mProcessingCommandTitle = null;
|
2011-02-13 19:53:50 -05:00
|
|
|
informUserOfStatus();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void searchStats(AccountStats stats) {
|
|
|
|
informUserOfStatus();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void systemStatusChanged() {
|
|
|
|
informUserOfStatus();
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public void folderStatusChanged(Account account, String folder, int unreadMessageCount) {
|
|
|
|
informUserOfStatus();
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
}
|
|
|
|
|
2011-02-06 17:09:48 -05:00
|
|
|
public int getFolderCompleted() {
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
return mFolderCompleted;
|
|
|
|
}
|
|
|
|
|
2011-02-28 16:55:34 -05:00
|
|
|
|
2011-02-06 17:09:48 -05:00
|
|
|
public int getFolderTotal() {
|
Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items. For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.
Fixes Issue 924.
Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-19 19:02:46 -05:00
|
|
|
return mFolderTotal;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|