settings: fix route to relay

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-07-23 12:29:09 -07:00
parent fe30704496
commit 5ddd8660a3
2 changed files with 3 additions and 4 deletions

View File

@@ -484,8 +484,7 @@ fn process_render_nav_action(
None None
} }
RenderNavAction::SettingsAction(action) => { RenderNavAction::SettingsAction(action) => {
action.process(app, ctx.theme, ctx.i18n, ctx.img_cache, ui.ctx()); action.process_settings_action(app, ctx.theme, ctx.i18n, ctx.img_cache, ui.ctx())
None
} }
}; };

View File

@@ -23,7 +23,7 @@ pub enum SettingsAction {
} }
impl SettingsAction { impl SettingsAction {
pub fn process<'a>( pub fn process_settings_action<'a>(
self, self,
app: &mut Damus, app: &mut Damus,
theme_handler: &'a mut ThemeHandler, theme_handler: &'a mut ThemeHandler,
@@ -35,7 +35,7 @@ impl SettingsAction {
match self { match self {
SettingsAction::OpenRelays => { SettingsAction::OpenRelays => {
route_action = Some(RouterAction::route_to(Route::Relays)) route_action = Some(RouterAction::route_to(Route::Relays));
} }
SettingsAction::SetZoom(zoom_level) => { SettingsAction::SetZoom(zoom_level) => {
ctx.set_zoom_factor(zoom_level); ctx.set_zoom_factor(zoom_level);