Show error popups on some server errors
This commit is contained in:
parent
ab36df3c2b
commit
5d5f55107a
7 changed files with 91 additions and 38 deletions
|
|
@ -11,6 +11,7 @@ use tokio::sync::mpsc;
|
|||
use toss::styled::Styled;
|
||||
use toss::terminal::Terminal;
|
||||
|
||||
use crate::euph::EuphRoomEvent;
|
||||
use crate::vault::Vault;
|
||||
|
||||
use super::euph::room::EuphRoom;
|
||||
|
|
@ -365,4 +366,16 @@ impl Rooms {
|
|||
|
||||
true
|
||||
}
|
||||
|
||||
pub fn handle_euph_room_event(&mut self, name: String, event: EuphRoomEvent) -> bool {
|
||||
let room_visible = if let State::ShowRoom(n) = &self.state {
|
||||
*n == name
|
||||
} else {
|
||||
true
|
||||
};
|
||||
|
||||
let room = self.get_or_insert_room(name);
|
||||
let handled = room.handle_euph_room_event(event);
|
||||
handled && room_visible
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue