From 8d858b762e1eff0a5c0da33192888984bf88b05e Mon Sep 17 00:00:00 2001 From: reya Date: Wed, 4 Mar 2026 14:29:13 +0700 Subject: [PATCH] fix the issue cause theme not reset --- crates/settings/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/settings/src/lib.rs b/crates/settings/src/lib.rs index 2fe1a84..09978dc 100644 --- a/crates/settings/src/lib.rs +++ b/crates/settings/src/lib.rs @@ -2,12 +2,12 @@ use std::collections::{HashMap, HashSet}; use std::fmt::Display; use std::rc::Rc; -use anyhow::{anyhow, Error}; +use anyhow::{Error, anyhow}; use common::config_dir; use gpui::{App, AppContext, Context, Entity, Global, Subscription, Task, Window}; use nostr_sdk::prelude::*; use serde::{Deserialize, Serialize}; -use smallvec::{smallvec, SmallVec}; +use smallvec::{SmallVec, smallvec}; use theme::{Theme, ThemeFamily, ThemeMode}; pub fn init(window: &mut Window, cx: &mut App) { @@ -291,6 +291,8 @@ impl AppSettings { /// Reset theme pub fn reset_theme(&mut self, window: &mut Window, cx: &mut Context) { self.values.theme = None; + cx.notify(); + self.apply_theme(window, cx); }