Fix 'Zoom with Scroll' not working after a page refresh (#1807)

* Fix 'Zoom with Scroll' not working after a page refresh

* Add semicolon

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Raminder Singh 2024-07-07 13:25:09 +05:30 committed by GitHub
parent 84d72621e5
commit 4cd11448a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -75,6 +75,7 @@ impl PreferencesDialogMessageHandler {
LayoutGroup::Row { widgets: imaginate_refresh_frequency },
]))
}
pub fn send_layout(&self, responses: &mut VecDeque<Message>, layout_target: LayoutTarget, preferences: &PreferencesMessageHandler) {
responses.add(LayoutMessage::SendLayout {
layout: self.layout(preferences),
@ -85,6 +86,7 @@ impl PreferencesDialogMessageHandler {
fn layout_column_2(&self) -> Layout {
Layout::default()
}
fn send_layout_column_2(&self, responses: &mut VecDeque<Message>, layout_target: LayoutTarget) {
responses.add(LayoutMessage::SendLayout {
layout: self.layout_column_2(),
@ -108,6 +110,7 @@ impl PreferencesDialogMessageHandler {
Layout::WidgetLayout(WidgetLayout::new(vec![LayoutGroup::Row { widgets }]))
}
fn send_layout_buttons(&self, responses: &mut VecDeque<Message>, layout_target: LayoutTarget) {
responses.add(LayoutMessage::SendLayout {
layout: self.layout_buttons(),

View File

@ -38,6 +38,9 @@ impl MessageHandler<PreferencesMessage, ()> for PreferencesMessageHandler {
responses.add(PortfolioMessage::ImaginateServerHostname);
responses.add(PortfolioMessage::ImaginateCheckServerStatus);
responses.add(PortfolioMessage::ImaginatePreferences);
responses.add(PreferencesMessage::ModifyLayout {
zoom_with_scroll: self.zoom_with_scroll,
});
}
}
PreferencesMessage::ResetToDefaults => {