Show all sources in the sources list #90

Merged
AmineB merged 2 commits from davidoskky/ReaderForSelfoss-multiplatform:sources into master 2022-11-01 20:30:31 +00:00
Contributor

Types of changes

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • This is NOT translation related.

This closes issue #79

## Types of changes - [x] I have read the **CONTRIBUTING** document. - [x] My code follows the code style of this project. - [ ] I have updated the documentation accordingly. - [ ] I have added tests to cover my changes. - [x] All new and existing tests passed. - [x] This is **NOT** translation related. This closes issue #79
davidoskky added 2 commits 2022-11-01 18:57:54 +00:00
Fix repeating items in recyclerview
All checks were successful
continuous-integration/drone/pr Build is passing
6d610ed61a
AmineB reviewed 2022-11-01 19:20:35 +00:00
@ -63,13 +63,6 @@ class SourcesActivity : AppCompatActivity(), DIAware {
)
binding.recyclerView.adapter = mAdapter
mAdapter.notifyDataSetChanged()
if (items.isEmpty()) {
Owner

Why was this deleted ?

Why was this deleted ?
Author
Contributor

This is unrelated to the issue, I just removed it since I stumbled upon it while finding a solution.

Just above:

if (response.isNotEmpty()) {
	items = response

It is thus redundant to print a message if no source is present since we already checked for that and handled it above.

This is unrelated to the issue, I just removed it since I stumbled upon it while finding a solution. Just above: ``` if (response.isNotEmpty()) { items = response ``` It is thus redundant to print a message if no source is present since we already checked for that and handled it above.
AmineB marked this conversation as resolved
@ -61,9 +61,13 @@ class SourcesListAdapter(
binding.sourceTitle.text = itm.title.getHtmlDecoded()
}
override fun getItemId(position: Int) = position.toLong()
Owner

Are these two changes really needed ?

Are these two changes really needed ?
Author
Contributor

Yes, these are the changes that actually solve the problem.
The position keeps getting reset otherwise and that was why we would get a repeating list.

Yes, these are the changes that actually solve the problem. The position keeps getting reset otherwise and that was why we would get a repeating list.
AmineB merged commit 16b10dc1b7 into master 2022-11-01 20:30:31 +00:00
davidoskky deleted branch sources 2022-11-01 20:31:21 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Louvorg/ReaderForSelfoss-multiplatform#90
No description provided.