Make items read by swiping disappear
This commit is contained in:
parent
8c5f4268a4
commit
5377e6c0f8
@ -80,17 +80,14 @@ abstract class ItemsAdapter<VH : RecyclerView.ViewHolder?> : RecyclerView.Adapte
|
|||||||
val i = items[position]
|
val i = items[position]
|
||||||
CoroutineScope(Dispatchers.IO).launch {
|
CoroutineScope(Dispatchers.IO).launch {
|
||||||
repository.markAsRead(i.id)
|
repository.markAsRead(i.id)
|
||||||
// TODO: update db
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// Todo:
|
if (repository.displayedItems == "unread") {
|
||||||
// if (SharedItems.displayedItems == "unread") {
|
items.remove(i)
|
||||||
// items.remove(i)
|
notifyItemRemoved(position)
|
||||||
// notifyItemRemoved(position)
|
updateItems(items)
|
||||||
// updateItems(items)
|
} else {
|
||||||
// } else {
|
notifyItemChanged(position)
|
||||||
// notifyItemChanged(position)
|
}
|
||||||
// }
|
|
||||||
if (showSnackbar) {
|
if (showSnackbar) {
|
||||||
unmarkSnackbar(i, position)
|
unmarkSnackbar(i, position)
|
||||||
}
|
}
|
||||||
|
@ -300,4 +300,6 @@ class RepositoryImpl(private val api: SelfossApi, private val apiDetails: ApiDet
|
|||||||
apiMajorVersion = settings.getInt("apiVersionMajor", 0)
|
apiMajorVersion = settings.getInt("apiVersionMajor", 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Handle offline actions
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user