diff options
Diffstat (limited to 'src/display')
| -rw-r--r-- | src/display/mod.rs | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/display/mod.rs b/src/display/mod.rs index 6115472..098bb1c 100644 --- a/src/display/mod.rs +++ b/src/display/mod.rs @@ -27,7 +27,7 @@ pub enum Infos { TweetWithContext(TweetId, String), Thread(Vec<TweetId>), Event(tw::events::Event), - DM(String), + DM(String, String, String), User(tw::user::User), Text(Vec<String>) } @@ -549,10 +549,8 @@ pub fn paint(tweeter: &::tw::TwitterCache, display_info: &mut DisplayInfo) -> Re }; wrapped.into_iter().rev().collect() }, - Infos::DM(msg) => { - let mut lines = vec![format!("{}{}{} DM:", cursor::Goto(1, height - h), clear::CurrentLine, "from")]; - lines.push(msg); - lines + Infos::DM(msg, from_id, to_id) => { + into_display_lines(render_dm(msg, from_id, to_id, tweeter, display_info, width), width).into_iter().rev().collect() } Infos::User(user) => { vec