From 73dc5dda6b8ca8a8bdae0f620442e359871b0152 Mon Sep 17 00:00:00 2001 From: Andy Wortman Date: Sat, 11 Nov 2017 04:35:35 -0800 Subject: start adding help reference --- src/main.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 37f190e..f2842c4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -380,6 +380,15 @@ fn do_ui(ui_rx_orig: chan::Receiver { + let mut help_lines = vec![]; + for command in commands::COMMANDS { + help_lines.push(format!("{} {}", command.keyword, command.help_str)); + } + tweeter.display_info.infos.push(display::Infos::Text(help_lines)); + display::paint(tweeter).unwrap(); + tweeter.state = tw::AppState::View; + } tw::AppState::Reconnect => { tweeter.state = tw::AppState::View; return Some((ui_rx_orig.clone(), tweeter.profile.clone().map(|creds| connect_twitter_stream(tweeter.app_key.clone(), creds)))); -- cgit v1.1