Support composing messages in an external editor (#155)
This commit is contained in:
11
src/base.rs
11
src/base.rs
@@ -202,6 +202,7 @@ pub enum RoomAction {
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub enum SendAction {
|
||||
Submit,
|
||||
SubmitFromEditor,
|
||||
Upload(String),
|
||||
UploadImage(usize, usize, Cow<'static, [u8]>),
|
||||
}
|
||||
@@ -222,6 +223,16 @@ pub enum IambAction {
|
||||
ToggleScrollbackFocus,
|
||||
}
|
||||
|
||||
impl IambAction {
|
||||
/// Indicates whether this action will draw over the screen.
|
||||
pub fn scribbles(&self) -> bool {
|
||||
match self {
|
||||
IambAction::Send(SendAction::SubmitFromEditor) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<HomeserverAction> for IambAction {
|
||||
fn from(act: HomeserverAction) -> Self {
|
||||
IambAction::Homeserver(act)
|
||||
|
||||
Reference in New Issue
Block a user