Merge pull request #4500 from k9mail/BackendFolder_cleanup
Remove unused method BackendFolder.getUnreadMessageCount()
This commit is contained in:
commit
3e64b7df1d
3 changed files with 0 additions and 16 deletions
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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?
|
||||||
|
|
|
@ -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")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue