-
Notifications
You must be signed in to change notification settings - Fork 731
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
Fix rooms section collapsing #5616
Conversation
43136b9
to
3c73ccc
Compare
Ktlint Results👎 |
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.
LGTM thanks
@@ -44,11 +45,12 @@ class SectionHeaderAdapter constructor( | |||
val shouldShowExpandedArrow: Boolean = false | |||
) | |||
|
|||
lateinit var roomsSectionData: RoomsSectionData | |||
var roomsSectionData: RoomsSectionData = roomsSectionData |
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.
strange line of code 🤔
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.
ah it's using the value from the constructor. A bit confusing
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.
it is to prevent the lateinit declaration of the attribute and the initialization check of the attribute which was previously done in the updateSection
method. I force passing the value as a constructor param and I init the attribute with that value. Previously, the attribute was initialized directly after creating the class object. I could set a different name to the param for clarity.
Fixes #4533 (to prevent from non intended collapse of the section). |
Type of change
Content
Fix inconsistencies between the arrow visibility and the collapse action by clicking on a room section header.
Motivation and context
The sections were always collapsible even if the arrow was not visible. Adding favourites in both DM and Rooms tab was causing issues on the arrow visibility for this section.
Screenshots / GIFs
Tests
Tested devices
Checklist