extract the per-account "reset visible limits" method

This commit is contained in:
Jesse Vincent 2010-11-12 23:41:33 +00:00
parent 46254bdc35
commit 9f695eb4ed
2 changed files with 16 additions and 11 deletions

View File

@ -575,6 +575,21 @@ public class Account implements BaseAccount
}
public void resetVisibleLimits()
{
try
{
LocalStore localStore = getLocalStore();
localStore.resetVisibleLimits(getDisplayCount());
}
catch (MessagingException e)
{
Log.e(K9.LOG_TAG, "Unable to reset visible limits", e);
}
}
public AccountStats getStats(Context context) throws MessagingException
{
long startTime = System.currentTimeMillis();

View File

@ -940,17 +940,7 @@ public class MessagingController implements Runnable
{
for (Account account : accounts)
{
try
{
LocalStore localStore = account.getLocalStore();
localStore.resetVisibleLimits(account.getDisplayCount());
}
catch (MessagingException e)
{
addErrorMessage(account, null, e);
Log.e(K9.LOG_TAG, "Unable to reset visible limits", e);
}
account.resetVisibleLimits();
}
}