mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 05:39:52 -07:00
Support composing messages in an external editor (#155)
This commit is contained in:
parent
47e650c2be
commit
0565b6eb05
6 changed files with 141 additions and 19 deletions
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue