Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Run rustfmt to adjust formatting
  • Loading branch information
Moaht committed Apr 29, 2026
commit f04462e4a77cb93223d5aa7232e10ae335120569
2 changes: 1 addition & 1 deletion src/core/app.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::core::sort::{SortContext, SortState};
use crate::core::user_config::{ UserConfig, color_to_string };
use crate::core::user_config::{color_to_string, UserConfig};
use crate::infra::network::sync::{PartySession, PartyStatus};
use crate::infra::network::IoEvent;
use crate::tui::event::Key;
Expand Down
12 changes: 9 additions & 3 deletions src/tui/handlers/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,10 @@ fn handle_string_edit(key: Key, app: &mut App) {
}
// Editing an individual color switches the theme to Custom
if is_color_edit {
if let Some(preset_setting) =
app.settings_items.iter_mut().find(|s| s.id == "theme.preset")
if let Some(preset_setting) = app
.settings_items
.iter_mut()
.find(|s| s.id == "theme.preset")
{
if let SettingValue::Preset(name) = &mut preset_setting.value {
*name = "Custom".to_string();
Expand Down Expand Up @@ -448,7 +450,11 @@ fn handle_preset_edit(key: Key, app: &mut App) {
if let Some(setting) = app.settings_items.get(app.settings_selected_index) {
if let SettingValue::Preset(ref preset_name) = setting.value {
let current = ThemePreset::from_name(preset_name);
let next = if forward { current.next() } else { current.prev() };
let next = if forward {
current.next()
} else {
current.prev()
};
if let Some(setting_mut) = app.settings_items.get_mut(app.settings_selected_index) {
setting_mut.value = SettingValue::Preset(next.name().to_string());
}
Expand Down
Loading