mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-30 13:12:25 -05:00
extract the per-account "reset visible limits" method
This commit is contained in:
parent
46254bdc35
commit
9f695eb4ed
@ -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
|
public AccountStats getStats(Context context) throws MessagingException
|
||||||
{
|
{
|
||||||
long startTime = System.currentTimeMillis();
|
long startTime = System.currentTimeMillis();
|
||||||
|
@ -940,17 +940,7 @@ public class MessagingController implements Runnable
|
|||||||
{
|
{
|
||||||
for (Account account : accounts)
|
for (Account account : accounts)
|
||||||
{
|
{
|
||||||
try
|
account.resetVisibleLimits();
|
||||||
{
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user