bhcli

A TUI for chatting on LE PHP Chats (onion)
git clone https://git.dasho.dev/n0tr1v/bhcli.git
Log | Files | Refs | README

commit 9e69daa3b2e82ad67c04bc0cc61299e0ada2a56b
parent 04527123f2ef3329a7e17e4a4ad786a82645ef96
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Fri,  7 Apr 2023 18:07:41 -0700

cleanup

Diffstat:
Msrc/main.rs | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/main.rs b/src/main.rs @@ -343,7 +343,7 @@ impl LeChatPHPClient { sig: &Arc<Mutex<Sig>>, messages: &Arc<Mutex<Vec<Message>>>, users: &Arc<Mutex<Users>>, - messages_updated_tx: crossbeam_channel::Sender<bool>, + messages_updated_tx: crossbeam_channel::Sender<()>, ) -> thread::JoinHandle<()> { let client = self.client.clone(); let messages = Arc::clone(&messages); @@ -1380,7 +1380,7 @@ fn get_msgs( tx: &crossbeam_channel::Sender<PostType>, users: &Arc<Mutex<Users>>, sig: &Arc<Mutex<Sig>>, - messages_updated_tx: &crossbeam_channel::Sender<bool>, + messages_updated_tx: &crossbeam_channel::Sender<()>, members_tag:&str, datetime_fmt: &str, messages: &Arc<Mutex<Vec<Message>>>, @@ -1406,7 +1406,7 @@ fn get_msgs( // Notify new messages has arrived. // This ensure that we redraw the messages on the screen right away. // Otherwise, the screen would not redraw until a keyboard event occurs. - messages_updated_tx.send(true).unwrap(); + messages_updated_tx.send(()).unwrap(); } { let mut users = users.lock().unwrap(); @@ -2643,7 +2643,7 @@ pub enum Event<I> { /// A small event handler that wrap termion input and tick events. Each event /// type is handled in its own thread and returned to a common `Receiver` struct Events { - messages_updated_rx: crossbeam_channel::Receiver<bool>, + messages_updated_rx: crossbeam_channel::Receiver<()>, exit_rx: crossbeam_channel::Receiver<ExitSignal>, rx: crossbeam_channel::Receiver<Event<CEvent>>, } @@ -2651,7 +2651,7 @@ struct Events { #[derive(Debug, Clone)] struct Config { pub exit_rx: crossbeam_channel::Receiver<ExitSignal>, - pub messages_updated_rx: crossbeam_channel::Receiver<bool>, + pub messages_updated_rx: crossbeam_channel::Receiver<()>, pub tick_rate: Duration, }