-
-
Notifications
You must be signed in to change notification settings - Fork 827
Use a more generic layout setting - useIRCLayout → layout #5571
Use a more generic layout setting - useIRCLayout → layout #5571
Conversation
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
/me didn't notice it was a draft and got ahead of myself :D |
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
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.
Thanks, seems like a good start!
src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx
Outdated
Show resolved
Hide resolved
src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx
Outdated
Show resolved
Hide resolved
src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
@jryans Thank you for the review! I've fixed some of the things. Please let me know if the rest is fine this way. |
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.
Thanks for working on this! Still a few things I'd like to see cleaned up, such as removing the commented out blocks.
@@ -106,6 +114,18 @@ export default class DeviceSettingsHandler extends SettingsHandler { | |||
return Promise.resolve(); | |||
} | |||
|
|||
// Special case for old useIRCLayout setting |
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.
Since this is a device only level, is there any need to write the old value? It seems like it would only be needed if you are going back in time to old versions, which seems unlikely. (If it were account level and synced to other devices, we would need it, but that doesn't seem to be the case here.)
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 if statement is here to delete useIRCLayout
. Otherwise, the following would always be true
:
if (settings["useIRCLayout"]) return Layout.IRC;
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 okay, fair enough. I suppose alternatively the read path could always check the modern value first and stop there if it exists, but anyway, this seems okay too.
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
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.
Thanks for working on this! This part seems ready to go. 😄
@@ -106,6 +114,18 @@ export default class DeviceSettingsHandler extends SettingsHandler { | |||
return Promise.resolve(); | |||
} | |||
|
|||
// Special case for old useIRCLayout setting |
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 okay, fair enough. I suppose alternatively the read path could always check the modern value first and stop there if it exists, but anyway, this seems okay too.
Reverts part of matrix-org#5571 It's probably quite reasonable to remove this now (after ~6 months) instead of keeping this forever Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This PR converts the
useIRCLayout
setting to a more genericlayout
setting. This is a part of the preparations for merging chat-bubbles.