Skip to content
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

App Layout: Restore bottom sheet fragment on device rotation #7144

Closed
ericdecanini opened this issue Sep 15, 2022 · 0 comments
Closed

App Layout: Restore bottom sheet fragment on device rotation #7144

ericdecanini opened this issue Sep 15, 2022 · 0 comments
Labels
T-Defect Something isn't working: bugs, crashes, hangs and other reported problems T-Task Refactoring, enabling or disabling functionality, other engineering tasks Team: Delight Z-AppLayout

Comments

@ericdecanini
Copy link
Contributor

ericdecanini commented Sep 15, 2022

An issue to gather a list of non-blocking defects or code improvements to be fixed as soon as time permits


One more point:
When spaceListBottomSheet is displayed, if the user rotates it's device, the Fragment SpaceListBottomSheet will be restored by the System (the BottomSheet will still be visible), but NewHomeDetailFragment will not have a correct reference to this Fragment, since it will just instantiate a new instance in the constructor.

So this code:
https://github.com/vector-im/element-android/blob/develop/vector/src/main/java/im/vector/app/features/home/NewHomeDetailFragment.kt#L197

will not work (I did not check though).

You should try to get the reference (by tag for instance) to the restored bottom sheet Fragment instead of creating a new one.

Originally posted by @bmarty in #7102 (comment)


@ericdecanini ericdecanini self-assigned this Sep 15, 2022
@ericdecanini ericdecanini added T-Task Refactoring, enabling or disabling functionality, other engineering tasks Team: Delight Z-AppLayout labels Sep 15, 2022
@germain-gg germain-gg changed the title App Layout Improvements Restore bottom sheet fragment on device rotation Sep 20, 2022
@daniellekirkwood daniellekirkwood added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Sep 20, 2022
@daniellekirkwood daniellekirkwood changed the title Restore bottom sheet fragment on device rotation App Layout: Restore bottom sheet fragment on device rotation Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect Something isn't working: bugs, crashes, hangs and other reported problems T-Task Refactoring, enabling or disabling functionality, other engineering tasks Team: Delight Z-AppLayout
Projects
None yet
Development

No branches or pull requests

2 participants