-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BugFix Check emptiness of previousSortGroupState #12540
Conversation
alperozturk96
commented
Feb 12, 2024
•
edited
Loading
edited
- Tests written, or not not needed
app/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java
Outdated
Show resolved
Hide resolved
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
ffd1c37
to
0bbff3b
Compare
Signed-off-by: alperozturk <[email protected]>
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/12540.apk |
/backport to stable-3.28 |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #12540 +/- ##
============================================
- Coverage 27.99% 27.94% -0.06%
+ Complexity 3368 3365 -3
============================================
Files 622 622
Lines 45514 45518 +4
Branches 6519 6521 +2
============================================
- Hits 12742 12720 -22
- Misses 30642 30660 +18
- Partials 2130 2138 +8
|
@@ -2486,7 +2486,12 @@ private void setSortListGroup(boolean currentListGroupVisibility, boolean show) | |||
* visibility earlier using {@link #setSortListGroup(boolean, boolean)} | |||
*/ | |||
private void popSortListGroupVisibility() { | |||
boolean popped = previousSortGroupState.pop(); | |||
showSortListGroup(popped); | |||
showSortListGroup(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would negate purpose of previousSortGroupState
, which was introduced by #11965. If this choice was deliberate, check that all edge cases are handled appropriately and remove this variable entirely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current implementation on master is broken. We should't see SortListGroup in file detail or file sharing tab also we have crash right now. Crash has been fixed and appearance of SortListGroup working as expected (visible in file list not visible in file details, sharing).
This PR aims to fix crash and appearance of SortListGroup not refactor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also agree with Tom, but we should create a new Issue about it and for now merge to fix the crash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JonasMayerDev I agree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick test, fixes crash
@@ -2486,7 +2486,12 @@ private void setSortListGroup(boolean currentListGroupVisibility, boolean show) | |||
* visibility earlier using {@link #setSortListGroup(boolean, boolean)} | |||
*/ | |||
private void popSortListGroupVisibility() { | |||
boolean popped = previousSortGroupState.pop(); | |||
showSortListGroup(popped); | |||
showSortListGroup(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also agree with Tom, but we should create a new Issue about it and for now merge to fix the crash.