diff --git a/src/components/wallet/event_logs.rs b/src/components/wallet/event_logs.rs index d772f12..f50c324 100644 --- a/src/components/wallet/event_logs.rs +++ b/src/components/wallet/event_logs.rs @@ -39,18 +39,15 @@ impl EventLogs { const MAX_LOGS: usize = 50; fn add_new_log(&mut self, message: String, level: ActionLevel) { - self.logs.push_back(WalletLog { + self.logs.push_front(WalletLog { time: chrono::Local::now(), level, message, }); if self.logs.len() > Self::MAX_LOGS { - let _ = self.logs.pop_front(); + let _ = self.logs.pop_back(); } - - self.table_state.select(Some(self.logs.len() - 1)); - self.scroll_state = self.scroll_state.content_length(self.logs.len()); } fn first_row(&mut self) {