1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04:00
This commit is contained in:
Jesse Vincent 2010-11-13 01:47:08 +00:00
parent a551dc8dff
commit a8de2d0000
6 changed files with 34 additions and 32 deletions

View File

@ -576,17 +576,17 @@ public class Account implements BaseAccount
} }
public void resetVisibleLimits() public void resetVisibleLimits()
{ {
try try
{ {
LocalStore localStore = getLocalStore(); LocalStore localStore = getLocalStore();
localStore.resetVisibleLimits(getDisplayCount()); localStore.resetVisibleLimits(getDisplayCount());
} }
catch (MessagingException e) catch (MessagingException e)
{ {
Log.e(K9.LOG_TAG, "Unable to reset visible limits", e); Log.e(K9.LOG_TAG, "Unable to reset visible limits", e);
} }
} }

View File

@ -1,8 +1,8 @@
/* Sourced from http://code.google.com/p/android-color-picker/source/browse/trunk/AmbilWarna/src/yuku/ambilwarna/AmbilWarnaBox.java?r=1 /* Sourced from http://code.google.com/p/android-color-picker/source/browse/trunk/AmbilWarna/src/yuku/ambilwarna/AmbilWarnaBox.java?r=1
* On 2010-11-07 * On 2010-11-07
* Translated to English, Ported to use the same (inferior) API as the more standard "ColorPickerDialog" and imported into the K-9 namespace by Jesse Vincent * Translated to English, Ported to use the same (inferior) API as the more standard "ColorPickerDialog" and imported into the K-9 namespace by Jesse Vincent
* In an ideal world, we should move to using AmbilWarna as an Android Library Project in the future * In an ideal world, we should move to using AmbilWarna as an Android Library Project in the future
* License: Apache 2.0 * License: Apache 2.0
* Author: yukuku@code.google.com * Author: yukuku@code.google.com
*/ */

View File

@ -1,8 +1,8 @@
/* Sourced from http://code.google.com/p/android-color-picker/source/browse/trunk/AmbilWarna/src/yuku/ambilwarna/AmbilWarnaDialog.java?r=1 /* Sourced from http://code.google.com/p/android-color-picker/source/browse/trunk/AmbilWarna/src/yuku/ambilwarna/AmbilWarnaDialog.java?r=1
* On 2010-11-07 * On 2010-11-07
* Translated to English, Ported to use the same (inferior) API as the more standard "ColorPickerDialog" and imported into the K-9 namespace by Jesse Vincent * Translated to English, Ported to use the same (inferior) API as the more standard "ColorPickerDialog" and imported into the K-9 namespace by Jesse Vincent
* In an ideal world, we should move to using AmbilWarna as an Android Library Project in the future * In an ideal world, we should move to using AmbilWarna as an Android Library Project in the future
* License: Apache 2.0 * License: Apache 2.0
* Author: yukuku@code.google.com * Author: yukuku@code.google.com
*/ */

View File

@ -2794,14 +2794,14 @@ public class MessageList
{ {
if (!mCurrentFolder.lastCheckFailed) if (!mCurrentFolder.lastCheckFailed)
{ {
if (mAccount.getDisplayCount() == 0 ) if (mAccount.getDisplayCount() == 0 )
{ {
holder.main.setText(getString(R.string.message_list_load_more_messages_action)); holder.main.setText(getString(R.string.message_list_load_more_messages_action));
} }
else else
{ {
holder.main.setText(String.format(getString(R.string.load_more_messages_fmt), mAccount.getDisplayCount())); holder.main.setText(String.format(getString(R.string.load_more_messages_fmt), mAccount.getDisplayCount()));
} }
} }
else else
{ {

View File

@ -925,7 +925,8 @@ public class MessagingController implements Runnable
{ {
LocalStore localStore = account.getLocalStore(); LocalStore localStore = account.getLocalStore();
LocalFolder localFolder = localStore.getFolder(folder); LocalFolder localFolder = localStore.getFolder(folder);
if (localFolder.getVisibleLimit() > 0 ) { if (localFolder.getVisibleLimit() > 0 )
{
localFolder.setVisibleLimit(localFolder.getVisibleLimit() + account.getDisplayCount()); localFolder.setVisibleLimit(localFolder.getVisibleLimit() + account.getDisplayCount());
} }
synchronizeMailbox(account, folder, listener, null); synchronizeMailbox(account, folder, listener, null);
@ -1121,11 +1122,12 @@ public class MessagingController implements Runnable
* Message numbers start at 1. * Message numbers start at 1.
*/ */
int remoteStart; int remoteStart;
if (visibleLimit > 0 ) if (visibleLimit > 0 )
{ {
remoteStart = Math.max(0, remoteMessageCount - visibleLimit) + 1; remoteStart = Math.max(0, remoteMessageCount - visibleLimit) + 1;
} }
else { else
{
remoteStart = 1; remoteStart = 1;
} }
int remoteEnd = remoteMessageCount; int remoteEnd = remoteMessageCount;

View File

@ -1150,9 +1150,9 @@ public class LocalStore extends Store implements Serializable
public void purgeToVisibleLimit(MessageRemovalListener listener) throws MessagingException public void purgeToVisibleLimit(MessageRemovalListener listener) throws MessagingException
{ {
if ( mVisibleLimit == 0) if ( mVisibleLimit == 0)
{ {
return ; return ;
} }
open(OpenMode.READ_WRITE); open(OpenMode.READ_WRITE);
Message[] messages = getMessages(null, false); Message[] messages = getMessages(null, false);
@ -2416,7 +2416,7 @@ public class LocalStore extends Store implements Serializable
return null; return null;
} }
// Only look at the first 8k of a message when calculating // Only look at the first 8k of a message when calculating
// the preview. This should avoid unnecessary // the preview. This should avoid unnecessary
// memory usage on large messages // memory usage on large messages
if (text.length() > 8192) if (text.length() > 8192)
@ -4758,7 +4758,7 @@ public class LocalStore extends Store implements Serializable
} }
@Override @Override
public String getSubject() public String getSubject()
{ {
return mSubject; return mSubject;
} }
@ -4892,11 +4892,11 @@ public class LocalStore extends Store implements Serializable
} }
/* /*
* If a message is being marked as deleted we want to clear out it's content * If a message is being marked as deleted we want to clear out it's content
* and attachments as well. Delete will not actually remove the row since we need * and attachments as well. Delete will not actually remove the row since we need
* to retain the uid for synchronization purposes. * to retain the uid for synchronization purposes.
*/ */
private void delete() throws MessagingException private void delete() throws MessagingException
{ {