Compare commits

..

2 Commits

Author SHA1 Message Date
41910cc4cd fix: Fixed handling of position in card adapter.
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is passing
2024-02-13 21:31:02 +01:00
db166ca9d4 Changelog for v124010301 [CI SKIP] 2024-01-30 19:36:37 +00:00
4 changed files with 14 additions and 6 deletions

View File

@ -1,3 +1,10 @@
**v124010301**
- fix: This may fix the oom errors.
- Changelog for v124010191 [CI SKIP]
--------------------------------------------------------------------
**v124010191**
- fix: moving listeners.

View File

@ -94,10 +94,10 @@ class ItemCardAdapter(
position: Int,
) {
with(holder) {
val itm = items[position]
val itm = items[holder.bindingAdapterPosition]
handleClickListeners(position)
handleLinkOpening(position)
handleClickListeners(holder.bindingAdapterPosition)
handleLinkOpening(holder.bindingAdapterPosition)
binding.favButton.isSelected = itm.starred
if (appSettingsService.getPublicAccess()) {

View File

@ -45,13 +45,13 @@ class ItemListAdapter(
position: Int,
) {
with(holder) {
val itm = items[position]
val itm = items[holder.bindingAdapterPosition]
binding.root.setOnClickListener {
repository.setReaderItems(items)
c.openItemUrl(
bindingAdapterPosition,
items[bindingAdapterPosition].getLinkDecoded(),
holder.bindingAdapterPosition,
items[holder.bindingAdapterPosition].getLinkDecoded(),
appSettingsService.isArticleViewerEnabled(),
app,
)

View File

@ -89,6 +89,7 @@ abstract class ItemsAdapter<VH : RecyclerView.ViewHolder?> : RecyclerView.Adapte
if (repository.displayedItems == ItemType.UNREAD) {
items.remove(item)
notifyItemRemoved(position)
notifyItemRangeChanged(position, itemCount)
updateItems(items)
} else {
notifyItemChanged(position)