fix: recalculate grid span count after rotation
Summary
- Recalculate the file-list grid span count after configuration changes.
- Keep the fragment's selected view type in sync when toggling between list and grid.
- Invalidate staggered-grid span assignments and request a relayout after the mode/orientation update.
- Add an unreleased changelog entry.
Fixes https://github.com/owncloud/android/issues/4884
Verification
JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home" ANDROID_HOME="/Users/himu/Library/Android/sdk" ./gradlew --no-daemon --console=plain :owncloudApp:compileOriginalDebugKotlingit diff --check
Hi @himu-gupta! Thanks for opening this PR! ๐๐ป
Some improvements here before the CR:
- Do not to forget to use Conventional commits for the message
- Commits must be GPG/PGP signed, and it'd be great if each commit include a
Signed-off-byline - I'd separate the calens into a different commit with the message:
chore: add calens file
Let us know if you have any doubts and we will help you! I will start with the code review when all changes are done ๐ป
Hi @himu-gupta! Thanks for opening this PR! ๐๐ป
Some improvements here before the CR:
- Do not to forget to use Conventional commits for the message
- Commits must be GPG/PGP signed, and it'd be great if each commit include a
Signed-off-byline- I'd separate the calens into a different commit with the message:
chore: add calens fileLet us know if you have any doubts and we will help you! I will start with the code review when all changes are done ๐ป
Thanks @joragua, I have done the requested changes.
Thanks for your contribution @himu-gupta!! Let me tell you how the process is. Basically, there are two phases after the PR is correct (signed commits, separated changelog, conventional commits correct...):
-
Code review: team will review the code you pushed and make suggestions for improvement. Usually, @joragua takes care of it.
-
QA: Once code review is approved, the feature/fix will be tested to detect defects or unexpected behaviors. I will take care of that.
For sure, all CI checks must be green as well, otherwise merging will be blocked.
Code review will start soon, keep tuned!!
Thanks for your contribution @himu-gupta!! Let me tell you how the process is. Basically, there are two phases after the PR is correct (signed commits, separated changelog, conventional commits correct...):
- Code review: team will review the code you pushed and make suggestions for improvement. Usually, @joragua takes care of it.
- QA: Once code review is approved, the feature/fix will be tested to detect defects or unexpected behaviors. I will take care of that.
For sure, all CI checks must be green as well, otherwise merging will be blocked.
Code review will start soon, keep tuned!!
Thanks for the insight
@joragua is anything pending from my end?
I'll take care of it as soon as possible and I'll ping you once the CR is ready! Stay tuned! ๐๐ป @himu-gupta
Thanks @joragua, addressed the CR in two new commits on top without force-pushing:
- afe11e5aa8315f71e2fc0a2ad83fa4cedadfc42b updates the calens file name/content to match the template and adds the PR link.
- 8f8534b18e8b037aa91e664d5adf6d52c539df71 removes the extra initialization guards and the explicit
invalidateSpanAssignments()/requestLayout()calls, relying onnotifyItemRangeChanged()for the refresh.
ey @himu-gupta how are you? don't hesitate to ping us if you need nothing. The current PR is almost ready (just a couple of tiny comments that @joragua suggested) to move to QA. Let us know! same for the other PR you opened.
- Security: no findings
- Stability: no findings
- Performance: 1 finding โ see review
- Test coverage: 0% on touched lines, below 85% โ test proposed in review
- TODOs found: none
- Dependency touched: no
- CI status: all green
- Stale review: no
๐ค Automated review by Claude Code (security ยท stability ยท performance ยท coverage)
Generated by Claude Code