This commit is contained in:
2026-01-14 08:47:36 +07:00
parent 0a824389e8
commit fa93d4ce0a
2 changed files with 40 additions and 30 deletions

View File

@@ -252,4 +252,14 @@ impl AppSettings {
self.values.trusted_relays.insert(url);
cx.notify();
}
/// Add a room configuration
pub fn add_room_config(&mut self, id: u64, config: RoomConfig, cx: &mut Context<Self>) {
self.values
.room_configs
.entry(id)
.and_modify(|this| *this = config)
.or_default();
cx.notify();
}
}