Move stability checks back into room
This commit is contained in:
parent
878467835e
commit
235fd9acc5
3 changed files with 15 additions and 22 deletions
|
|
@ -2,7 +2,6 @@ use std::sync::Arc;
|
|||
|
||||
use crossterm::event::KeyCode;
|
||||
use crossterm::style::{ContentStyle, Stylize};
|
||||
use euphoxide::conn::{Joining, Status};
|
||||
use parking_lot::FairMutex;
|
||||
use toss::terminal::Terminal;
|
||||
|
||||
|
|
@ -16,22 +15,10 @@ use crate::ui::widgets::popup::Popup;
|
|||
use crate::ui::widgets::text::Text;
|
||||
use crate::ui::widgets::BoxedWidget;
|
||||
|
||||
use super::room::RoomStatus;
|
||||
|
||||
pub fn new() -> EditorState {
|
||||
EditorState::new()
|
||||
}
|
||||
|
||||
pub fn stable(status: &RoomStatus) -> bool {
|
||||
matches!(
|
||||
status,
|
||||
RoomStatus::Connected(Status::Joining(Joining {
|
||||
bounce: Some(_),
|
||||
..
|
||||
}))
|
||||
)
|
||||
}
|
||||
|
||||
pub fn widget() -> BoxedWidget {
|
||||
Popup::new(
|
||||
Padding::new(Cursor::new(Text::new((
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue