mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-21 05:01:54 -05:00
renamed deleteMessagesOlderThan to clearMessagesOlderThan to better
reflect that it just nukes local copies rather than the synced copies
This commit is contained in:
parent
7d40596aa1
commit
0eee80f08b
@ -2939,7 +2939,7 @@ public class MessagingController implements Runnable
|
|||||||
|
|
||||||
localFolder.appendMessages(messages);
|
localFolder.appendMessages(messages);
|
||||||
|
|
||||||
localFolder.deleteMessagesOlderThan(nowTime - (15 * 60 * 1000));
|
localFolder.clearMessagesOlderThan(nowTime - (15 * 60 * 1000));
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Throwable it)
|
catch (Throwable it)
|
||||||
|
@ -3438,7 +3438,7 @@ public class LocalStore extends Store implements Serializable, LocalStoreMigrati
|
|||||||
throw new MessagingException("Cannot call getUidFromMessageId on LocalFolder");
|
throw new MessagingException("Cannot call getUidFromMessageId on LocalFolder");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void deleteMessagesWhere(final String whereClause, final String[] params) throws MessagingException
|
private void clearMessagesWhere(final String whereClause, final String[] params) throws MessagingException
|
||||||
{
|
{
|
||||||
open(OpenMode.READ_ONLY);
|
open(OpenMode.READ_ONLY);
|
||||||
Message[] messages = LocalStore.this.getMessages(
|
Message[] messages = LocalStore.this.getMessages(
|
||||||
@ -3463,7 +3463,7 @@ public class LocalStore extends Store implements Serializable, LocalStoreMigrati
|
|||||||
resetUnreadAndFlaggedCounts();
|
resetUnreadAndFlaggedCounts();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteMessagesOlderThan(long cutoff) throws MessagingException
|
public void clearMessagesOlderThan(long cutoff) throws MessagingException
|
||||||
{
|
{
|
||||||
final String where = "folder_id = ? and date < ?";
|
final String where = "folder_id = ? and date < ?";
|
||||||
final String[] params = new String[]
|
final String[] params = new String[]
|
||||||
@ -3471,7 +3471,7 @@ public class LocalStore extends Store implements Serializable, LocalStoreMigrati
|
|||||||
Long.toString(mFolderId), Long.toString(cutoff)
|
Long.toString(mFolderId), Long.toString(cutoff)
|
||||||
};
|
};
|
||||||
|
|
||||||
deleteMessagesWhere(where, params);
|
clearMessagesWhere(where, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user