Merge pull request #4500 from k9mail/BackendFolder_cleanup

Remove unused method BackendFolder.getUnreadMessageCount()
This commit is contained in:
cketti 2020-02-04 18:41:19 +01:00 committed by GitHub
commit 3e64b7df1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 16 deletions

View file

@ -88,17 +88,6 @@ class K9BackendFolder(
database.setString(column = "more_messages", value = moreMessages.toDatabaseValue()) 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) { override fun setLastChecked(timestamp: Long) {
database.setLong(column = "last_updated", value = timestamp) database.setLong(column = "last_updated", value = timestamp)
} }

View file

@ -14,7 +14,6 @@ interface BackendFolder {
fun getLastUid(): Long? fun getLastUid(): Long?
fun getMoreMessages(): MoreMessages fun getMoreMessages(): MoreMessages
fun setMoreMessages(moreMessages: MoreMessages) fun setMoreMessages(moreMessages: MoreMessages)
fun getUnreadMessageCount(): Int
fun setLastChecked(timestamp: Long) fun setLastChecked(timestamp: Long)
fun setStatus(status: String?) fun setStatus(status: String?)
fun getPushState(): String? fun getPushState(): String?

View file

@ -32,10 +32,6 @@ class InMemoryBackendFolder(override var name: String, var type: FolderType) : B
throw UnsupportedOperationException("not implemented") throw UnsupportedOperationException("not implemented")
} }
override fun getUnreadMessageCount(): Int {
throw UnsupportedOperationException("not implemented")
}
override fun setLastChecked(timestamp: Long) { override fun setLastChecked(timestamp: Long) {
throw UnsupportedOperationException("not implemented") throw UnsupportedOperationException("not implemented")
} }