Fix crash when removing multiple favorites when in favorites tab #12357
Merged
alperozturk96 merged 2 commits intomasterfrom Jan 12, 2024
Merged
Conversation
Signed-off-by: Jonas Mayer <jonas.a.mayer@gmx.net>
5584ef9 to
9c7890d
Compare
Signed-off-by: Jonas Mayer <jonas.a.mayer@gmx.net>
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/12357.apk |
alperozturk96
approved these changes
Jan 11, 2024
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #12357 +/- ##
============================================
+ Coverage 27.77% 27.88% +0.10%
- Complexity 3214 3229 +15
============================================
Files 596 596
Lines 44582 44586 +4
Branches 6419 6420 +1
============================================
+ Hits 12384 12434 +50
+ Misses 30160 30100 -60
- Partials 2038 2052 +14
|
Closed
4 tasks
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

When removing files from favorites on master, file gets deleted and calling notifyDataSetChanged gets scheduled. -> At some point, adapter does not know that file was deleted -> Crash when scrolling to point that should not be reachable since not enough items.
Details
https://github.com/nextcloud/android/assets/43114340/0bd24014-8144-4317-8aad-652cdcf71ff9
Master
https://github.com/nextcloud/android/assets/43114340/114c8e1e-4f8d-4a52-ae80-2d14628b1264
This PR