Update todo comments

This commit is contained in:
davidoskky 2022-08-17 20:26:02 +02:00
parent 0145349817
commit c361819664

View File

@ -65,7 +65,6 @@ class Repository(private val api: SelfossApi, private val apiDetails: ApiDetails
items = ArrayList(fetchedItems) items = ArrayList(fetchedItems)
} }
} else { } else {
// TODO: Provide an error message if the connection is not available.
// TODO: Get items from the database // TODO: Get items from the database
} }
return items return items
@ -88,7 +87,7 @@ class Repository(private val api: SelfossApi, private val apiDetails: ApiDetails
appendItems(fetchedItems) appendItems(fetchedItems)
} }
} else { } else {
// TODO: Provide an error message // TODO: Get items from the database
} }
return items return items
} }
@ -105,6 +104,7 @@ class Repository(private val api: SelfossApi, private val apiDetails: ApiDetails
null null
) )
} else { } else {
// TODO: Provide an error message
null null
} }
} }
@ -186,7 +186,6 @@ class Repository(private val api: SelfossApi, private val apiDetails: ApiDetails
} }
suspend fun unmarkAsRead(item: SelfossModel.Item): Boolean { suspend fun unmarkAsRead(item: SelfossModel.Item): Boolean {
// TODO: Check internet connection
val success = unmarkAsReadById(item.id) val success = unmarkAsReadById(item.id)
if (success) { if (success) {
@ -196,7 +195,6 @@ class Repository(private val api: SelfossApi, private val apiDetails: ApiDetails
} }
suspend fun unmarkAsReadById(id: Int): Boolean { suspend fun unmarkAsReadById(id: Int): Boolean {
// TODO: Check internet connection
var success = false var success = false
if (isConnectionAvailable.value && !offlineOverride) { if (isConnectionAvailable.value && !offlineOverride) {
success = api.unmarkAsRead(id.toString())?.isSuccess == true success = api.unmarkAsRead(id.toString())?.isSuccess == true