diff --git a/app/core/src/main/java/com/fsck/k9/mailstore/K9BackendFolder.kt b/app/core/src/main/java/com/fsck/k9/mailstore/K9BackendFolder.kt index 115d87439..2e29799f4 100644 --- a/app/core/src/main/java/com/fsck/k9/mailstore/K9BackendFolder.kt +++ b/app/core/src/main/java/com/fsck/k9/mailstore/K9BackendFolder.kt @@ -88,17 +88,6 @@ class K9BackendFolder( database.setString(column = "more_messages", value = moreMessages.toDatabaseValue()) } - override fun getUnreadMessageCount(): Int { - return database.rawQuery("SELECT COUNT(id) FROM messages" + - " WHERE folder_id = ? AND empty = 0 AND deleted = 0 AND read = 0", databaseId) { cursor -> - if (cursor.moveToFirst()) { - cursor.getInt(0) - } else { - throw IllegalStateException("Couldn't get unread message count for folder $folderServerId") - } - } - } - override fun setLastChecked(timestamp: Long) { database.setLong(column = "last_updated", value = timestamp) } diff --git a/backend/api/src/main/java/com/fsck/k9/backend/api/BackendFolder.kt b/backend/api/src/main/java/com/fsck/k9/backend/api/BackendFolder.kt index 6851625ab..b3a04bc91 100644 --- a/backend/api/src/main/java/com/fsck/k9/backend/api/BackendFolder.kt +++ b/backend/api/src/main/java/com/fsck/k9/backend/api/BackendFolder.kt @@ -14,7 +14,6 @@ interface BackendFolder { fun getLastUid(): Long? fun getMoreMessages(): MoreMessages fun setMoreMessages(moreMessages: MoreMessages) - fun getUnreadMessageCount(): Int fun setLastChecked(timestamp: Long) fun setStatus(status: String?) fun getPushState(): String? diff --git a/backend/jmap/src/test/java/com/fsck/k9/backend/jmap/InMemoryBackendFolder.kt b/backend/jmap/src/test/java/com/fsck/k9/backend/jmap/InMemoryBackendFolder.kt index 7f6c5a6f1..35a71eea6 100644 --- a/backend/jmap/src/test/java/com/fsck/k9/backend/jmap/InMemoryBackendFolder.kt +++ b/backend/jmap/src/test/java/com/fsck/k9/backend/jmap/InMemoryBackendFolder.kt @@ -32,10 +32,6 @@ class InMemoryBackendFolder(override var name: String, var type: FolderType) : B throw UnsupportedOperationException("not implemented") } - override fun getUnreadMessageCount(): Int { - throw UnsupportedOperationException("not implemented") - } - override fun setLastChecked(timestamp: Long) { throw UnsupportedOperationException("not implemented") }