Search in sources :

Example 1 with EmailProviderCache

use of com.fsck.k9.cache.EmailProviderCache in project k-9 by k9mail.

the class MessagingController method removeFlagForThreadsFromCache.

private void removeFlagForThreadsFromCache(final Account account, final List<Long> messageIds, final Flag flag) {
    EmailProviderCache cache = EmailProviderCache.getCache(account.getUuid(), context);
    String columnName = LocalStore.getColumnNameForFlag(flag);
    cache.removeValueForThreads(messageIds, columnName);
}
Also used : EmailProviderCache(com.fsck.k9.cache.EmailProviderCache)

Example 2 with EmailProviderCache

use of com.fsck.k9.cache.EmailProviderCache in project k-9 by k9mail.

the class MessagingController method setFlagInCache.

private void setFlagInCache(final Account account, final List<Long> messageIds, final Flag flag, final boolean newState) {
    EmailProviderCache cache = EmailProviderCache.getCache(account.getUuid(), context);
    String columnName = LocalStore.getColumnNameForFlag(flag);
    String value = Integer.toString((newState) ? 1 : 0);
    cache.setValueForMessages(messageIds, columnName, value);
}
Also used : EmailProviderCache(com.fsck.k9.cache.EmailProviderCache)

Example 3 with EmailProviderCache

use of com.fsck.k9.cache.EmailProviderCache in project k-9 by k9mail.

the class MessagingController method unsuppressMessages.

private void unsuppressMessages(Account account, List<? extends Message> messages) {
    EmailProviderCache cache = EmailProviderCache.getCache(account.getUuid(), context);
    cache.unhideMessages(messages);
}
Also used : EmailProviderCache(com.fsck.k9.cache.EmailProviderCache)

Example 4 with EmailProviderCache

use of com.fsck.k9.cache.EmailProviderCache in project k-9 by k9mail.

the class MessagingController method setFlagForThreadsInCache.

private void setFlagForThreadsInCache(final Account account, final List<Long> threadRootIds, final Flag flag, final boolean newState) {
    EmailProviderCache cache = EmailProviderCache.getCache(account.getUuid(), context);
    String columnName = LocalStore.getColumnNameForFlag(flag);
    String value = Integer.toString((newState) ? 1 : 0);
    cache.setValueForThreads(threadRootIds, columnName, value);
}
Also used : EmailProviderCache(com.fsck.k9.cache.EmailProviderCache)

Example 5 with EmailProviderCache

use of com.fsck.k9.cache.EmailProviderCache in project k-9 by k9mail.

the class MessagingController method removeFlagFromCache.

private void removeFlagFromCache(final Account account, final List<Long> messageIds, final Flag flag) {
    EmailProviderCache cache = EmailProviderCache.getCache(account.getUuid(), context);
    String columnName = LocalStore.getColumnNameForFlag(flag);
    cache.removeValueForMessages(messageIds, columnName);
}
Also used : EmailProviderCache(com.fsck.k9.cache.EmailProviderCache)

Aggregations

EmailProviderCache (com.fsck.k9.cache.EmailProviderCache)7