1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-01-13 14:48:04 -05:00
This commit is contained in:
Jesse Vincent 2010-07-19 01:57:49 +00:00
parent a75bf8668e
commit f9a24cb123
3 changed files with 39 additions and 36 deletions

View File

@ -207,37 +207,37 @@ public class Account implements BaseAccount
mAutomaticCheckIntervalMinutes = prefs.getInt(mUuid mAutomaticCheckIntervalMinutes = prefs.getInt(mUuid
+ ".automaticCheckIntervalMinutes", -1); + ".automaticCheckIntervalMinutes", -1);
mIdleRefreshMinutes = prefs.getInt(mUuid mIdleRefreshMinutes = prefs.getInt(mUuid
+ ".idleRefreshMinutes", 24); + ".idleRefreshMinutes", 24);
mSaveAllHeaders = prefs.getBoolean(mUuid mSaveAllHeaders = prefs.getBoolean(mUuid
+ ".saveAllHeaders", false); + ".saveAllHeaders", false);
mPushPollOnConnect = prefs.getBoolean(mUuid mPushPollOnConnect = prefs.getBoolean(mUuid
+ ".pushPollOnConnect", true); + ".pushPollOnConnect", true);
mDisplayCount = prefs.getInt(mUuid + ".displayCount", K9.DEFAULT_VISIBLE_LIMIT); mDisplayCount = prefs.getInt(mUuid + ".displayCount", K9.DEFAULT_VISIBLE_LIMIT);
if (mDisplayCount < 0) if (mDisplayCount < 0)
{ {
mDisplayCount = K9.DEFAULT_VISIBLE_LIMIT; mDisplayCount = K9.DEFAULT_VISIBLE_LIMIT;
} }
mLastAutomaticCheckTime = prefs.getLong(mUuid mLastAutomaticCheckTime = prefs.getLong(mUuid
+ ".lastAutomaticCheckTime", 0); + ".lastAutomaticCheckTime", 0);
mNotifyNewMail = prefs.getBoolean(mUuid + ".notifyNewMail", mNotifyNewMail = prefs.getBoolean(mUuid + ".notifyNewMail",
false); false);
mNotifySelfNewMail = prefs.getBoolean(mUuid + ".notifySelfNewMail", mNotifySelfNewMail = prefs.getBoolean(mUuid + ".notifySelfNewMail",
true); true);
mNotifySync = prefs.getBoolean(mUuid + ".notifyMailCheck", mNotifySync = prefs.getBoolean(mUuid + ".notifyMailCheck",
false); false);
mDeletePolicy = prefs.getInt(mUuid + ".deletePolicy", 0); mDeletePolicy = prefs.getInt(mUuid + ".deletePolicy", 0);
mDraftsFolderName = prefs.getString(mUuid + ".draftsFolderName", mDraftsFolderName = prefs.getString(mUuid + ".draftsFolderName",
"Drafts"); "Drafts");
mSentFolderName = prefs.getString(mUuid + ".sentFolderName", mSentFolderName = prefs.getString(mUuid + ".sentFolderName",
"Sent"); "Sent");
mTrashFolderName = prefs.getString(mUuid + ".trashFolderName", mTrashFolderName = prefs.getString(mUuid + ".trashFolderName",
"Trash"); "Trash");
mArchiveFolderName = prefs.getString(mUuid + ".archiveFolderName", mArchiveFolderName = prefs.getString(mUuid + ".archiveFolderName",
"Archive"); "Archive");
mSpamFolderName = prefs.getString(mUuid + ".spamFolderName", mSpamFolderName = prefs.getString(mUuid + ".spamFolderName",
"Spam"); "Spam");
mOutboxFolderName = prefs.getString(mUuid + ".outboxFolderName", mOutboxFolderName = prefs.getString(mUuid + ".outboxFolderName",
"Outbox"); "Outbox");
mExpungePolicy = prefs.getString(mUuid + ".expungePolicy", EXPUNGE_IMMEDIATELY); mExpungePolicy = prefs.getString(mUuid + ".expungePolicy", EXPUNGE_IMMEDIATELY);
mSyncRemoteDeletions = prefs.getBoolean(mUuid + ".syncRemoteDeletions", true); mSyncRemoteDeletions = prefs.getBoolean(mUuid + ".syncRemoteDeletions", true);
@ -247,7 +247,7 @@ public class Account implements BaseAccount
subscribedFoldersOnly = prefs.getBoolean(mUuid + ".subscribedFoldersOnly", subscribedFoldersOnly = prefs.getBoolean(mUuid + ".subscribedFoldersOnly",
false); false);
maximumPolledMessageAge = prefs.getInt(mUuid maximumPolledMessageAge = prefs.getInt(mUuid
+ ".maximumPolledMessageAge", -1); + ".maximumPolledMessageAge", -1);
maximumAutoDownloadMessageSize = prefs.getInt(mUuid maximumAutoDownloadMessageSize = prefs.getInt(mUuid
+ ".maximumAutoDownloadMessageSize", 32768); + ".maximumAutoDownloadMessageSize", 32768);
mQuotePrefix = prefs.getString(mUuid + ".quotePrefix", DEFAULT_QUOTE_PREFIX); mQuotePrefix = prefs.getString(mUuid + ".quotePrefix", DEFAULT_QUOTE_PREFIX);
@ -259,17 +259,17 @@ public class Account implements BaseAccount
} }
mAutoExpandFolderName = prefs.getString(mUuid + ".autoExpandFolderName", mAutoExpandFolderName = prefs.getString(mUuid + ".autoExpandFolderName",
"INBOX"); "INBOX");
mAccountNumber = prefs.getInt(mUuid + ".accountNumber", 0); mAccountNumber = prefs.getInt(mUuid + ".accountNumber", 0);
Random random = new Random((long)mAccountNumber+4); Random random = new Random((long)mAccountNumber+4);
mChipColor = prefs.getInt(mUuid+".chipColor", mChipColor = prefs.getInt(mUuid+".chipColor",
(random.nextInt(0x70)) + (random.nextInt(0x70)) +
(random.nextInt(0x70) * 0xff) + (random.nextInt(0x70) * 0xff) +
(random.nextInt(0x70) * 0xffff) + (random.nextInt(0x70) * 0xffff) +
0xff000000); 0xff000000);
mLedColor = prefs.getInt(mUuid+".ledColor", mChipColor); mLedColor = prefs.getInt(mUuid+".ledColor", mChipColor);
@ -303,7 +303,7 @@ public class Account implements BaseAccount
mEnableMoveButtons = prefs.getBoolean(mUuid + ".enableMoveButtons", false); mEnableMoveButtons = prefs.getBoolean(mUuid + ".enableMoveButtons", false);
mRingtoneUri = prefs.getString(mUuid + ".ringtone", mRingtoneUri = prefs.getString(mUuid + ".ringtone",
"content://settings/system/notification_sound"); "content://settings/system/notification_sound");
try try
{ {
mFolderDisplayMode = FolderMode.valueOf(prefs.getString(mUuid + ".folderDisplayMode", mFolderDisplayMode = FolderMode.valueOf(prefs.getString(mUuid + ".folderDisplayMode",

View File

@ -329,16 +329,16 @@ public class MessageView extends K9Activity implements OnClickListener
public void removeAllAttachments() public void removeAllAttachments()
{ {
runOnUiThread(new Runnable() runOnUiThread(new Runnable()
{
public void run()
{ {
public void run()
{
for (int i = 0, count = mAttachments.getChildCount(); i < count; i++) for (int i = 0, count = mAttachments.getChildCount(); i < count; i++)
{ {
mAttachments.removeView(mAttachments.getChildAt(i)); mAttachments.removeView(mAttachments.getChildAt(i));
} }
} }
}); });
} }
@ -434,13 +434,16 @@ public class MessageView extends K9Activity implements OnClickListener
null); // bottom null); // bottom
} }
if(mMessage.isSet(Flag.X_DOWNLOADED_FULL)) { if (mMessage.isSet(Flag.X_DOWNLOADED_FULL))
mDownloadRemainder.setVisibility(View.GONE); {
} else { mDownloadRemainder.setVisibility(View.GONE);
mDownloadRemainder.setEnabled(true); }
mDownloadRemainder.setVisibility(View.VISIBLE); else
{
mDownloadRemainder.setEnabled(true);
mDownloadRemainder.setVisibility(View.VISIBLE);
} }
} }
}); });
@ -1521,11 +1524,11 @@ public class MessageView extends K9Activity implements OnClickListener
} }
private void onDownloadRemainder() private void onDownloadRemainder()
{
if (mMessage.isSet(Flag.X_DOWNLOADED_FULL))
{ {
if(mMessage.isSet(Flag.X_DOWNLOADED_FULL)) return;
{ }
return;
}
@ -1536,7 +1539,7 @@ public class MessageView extends K9Activity implements OnClickListener
mMessageReference.uid, mMessageReference.uid,
mListener); mListener);
} }
private void onDownloadAttachment(Attachment attachment) private void onDownloadAttachment(Attachment attachment)
{ {

View File

@ -2996,7 +2996,7 @@ public class MessagingController implements Runnable
} }
public void loadMessageForViewRemote(final Account account, final String folder, public void loadMessageForViewRemote(final Account account, final String folder,
final String uid, final MessagingListener listener) final String uid, final MessagingListener listener)
{ {
put("loadMessageForViewRemote", listener, new Runnable() put("loadMessageForViewRemote", listener, new Runnable()
{ {