mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-19 21:29:52 -07:00
Add "default_room" to profile settings (#25)
This commit is contained in:
parent
b968d8c4a2
commit
4337be108b
3 changed files with 13 additions and 1 deletions
|
@ -138,7 +138,14 @@ impl Application {
|
|||
let cmds = crate::commands::setup_commands();
|
||||
|
||||
let mut locked = store.lock().await;
|
||||
let win = IambWindow::open(IambId::Welcome, locked.deref_mut()).unwrap();
|
||||
|
||||
let win = settings
|
||||
.tunables
|
||||
.default_room
|
||||
.and_then(|room| IambWindow::find(room, locked.deref_mut()).ok())
|
||||
.or_else(|| IambWindow::open(IambId::Welcome, locked.deref_mut()).ok())
|
||||
.unwrap();
|
||||
|
||||
let cmd = CommandBarState::new(IambBufferId::Command, locked.deref_mut());
|
||||
let screen = ScreenState::new(win, cmd);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue