1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-03-01 09:01:47 -05: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

@ -578,15 +578,15 @@ 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

@ -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);
@ -1125,7 +1126,8 @@ public class MessagingController implements Runnable
{ {
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

@ -1152,7 +1152,7 @@ public class LocalStore extends Store implements Serializable
{ {
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);
@ -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
{ {