Rename MessageStore.setLastUpdated() to setLastChecked()

This commit is contained in:
cketti 2021-08-14 20:37:27 +02:00
parent f6cb1f9072
commit 3252002629
5 changed files with 7 additions and 7 deletions

View file

@ -67,7 +67,7 @@ class K9BackendFolder(
}
override fun setLastChecked(timestamp: Long) {
messageStore.setLastUpdated(folderId, timestamp)
messageStore.setLastChecked(folderId, timestamp)
}
override fun setStatus(status: String?) {

View file

@ -212,9 +212,9 @@ interface MessageStore {
fun setMoreMessages(folderId: Long, moreMessages: MoreMessages)
/**
* Update the 'last updated' state of a folder.
* Update the time when the folder was last checked for new messages.
*/
fun setLastUpdated(folderId: Long, timestamp: Long)
fun setLastChecked(folderId: Long, timestamp: Long)
/**
* Update folder status message.

View file

@ -165,8 +165,8 @@ class K9MessageStore(
updateFolderOperations.setMoreMessages(folderId, moreMessages)
}
override fun setLastUpdated(folderId: Long, timestamp: Long) {
updateFolderOperations.setLastUpdated(folderId, timestamp)
override fun setLastChecked(folderId: Long, timestamp: Long) {
updateFolderOperations.setLastChecked(folderId, timestamp)
}
override fun setStatus(folderId: Long, status: String?) {

View file

@ -65,7 +65,7 @@ internal class UpdateFolderOperations(private val lockableDatabase: LockableData
setString(folderId = folderId, columnName = "more_messages", value = moreMessages.databaseName)
}
fun setLastUpdated(folderId: Long, timestamp: Long) {
fun setLastChecked(folderId: Long, timestamp: Long) {
lockableDatabase.execute(false) { db ->
val contentValues = ContentValues().apply {
put("last_updated", timestamp)

View file

@ -135,7 +135,7 @@ class UpdateFolderOperationsTest : RobolectricTest() {
fun `update late updated state`() {
val folderId = sqliteDatabase.createFolder(lastUpdated = 23)
updateFolderOperations.setLastUpdated(folderId = folderId, timestamp = 42)
updateFolderOperations.setLastChecked(folderId = folderId, timestamp = 42)
val folder = sqliteDatabase.readFolders().first()
assertThat(folder.id).isEqualTo(folderId)