Fix recycleview article positions #163
No reviewers
Labels
No Label
Difficulty - Beginner friendly
Difficulty = Easy
Difficulty = Hard
Difficulty = Medium
Priority = CRITICAL
Priority = High
Priority = Low
Priority = Normal
Priority = Some day
Status - Fixed somewhere else
Status - No details provided
Status = Can't fix
Status = Duplicate
Status = Help wanted
Status = Invalid
Status = Need more details
Status = Taken
Status = Wontfix
Type - Selfoss works like this
Type = Bug
Type = Chore
Type = Enhancement
Type = Feature
Type = Question
Type = SELFOSS API ISSUE
Type = Tools
Type = UX/Design
Up For Grabs
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Louvorg/ReaderForSelfoss-multiplatform#163
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "davidoskky/ReaderForSelfoss-multiplatform:incorrectArticles"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The articles were being opened by setting a click listener on the binding.
In card view this was being done through a function and as such it used the overall viewbind of the recyclerview rather than the binding of the item viewholder. I'm not really sure as to why it previously worked and then stopped doing so.
Now the functions are more explicit to avoid future errors.
Pulled up a few members from ItemCardAdapter and ItemListAdapter to ItemAdapter.
Types of changes
This closes issue #162
@ -663,4 +659,0 @@
private fun updateItems(adapterItems: ArrayList<SelfossModel.Item>) {
items = adapterItems
}
This was needed so the
HomeActivity
have an updateditems
array. This should be added back here and in the adapters.@ -100,2 +84,2 @@
handleClickListeners(holder.bindingAdapterPosition)
handleLinkOpening(holder.bindingAdapterPosition)
handleClickListeners(binding, position)
openLink(binding, position)
openLink
function does not open the link. It should be renamed. I think thathandleLinkOpening
was pretty clear.@ -72,1 +78,4 @@
protected fun openLink(holderBinding: ViewBinding, position: Int) {
holderBinding.root.setOnClickListener {
Log.d(
This log is not needed anymore
Sorry, I pushed a bit too quickly. I’ve reverted the changes and renamed
updateItems
in the adapter toupdateHomeItems
to make its purpose clearer.Thanks !