Fix Into<Text> issue

This commit is contained in:
danielsanchezq 2024-01-03 13:01:41 +01:00
parent c2cca069a0
commit 799ced59c8
2 changed files with 4 additions and 4 deletions

View File

@ -268,7 +268,7 @@ async fn fetch_new_messages(
);
for block in new_blocks.iter().rev() {
let blobs = get_block_blobs(node, &block).await?;
let blobs = get_block_blobs(node, block).await?;
for blob in blobs {
da_protocol.recv_blob(blob);
// Full replication only needs one blob to decode the data, so the unwrap is safe

View File

@ -1,6 +1,7 @@
use super::{App, ChatMessage};
use ratatui::prelude::*;
use ratatui::widgets::{Block, Borders, List, ListItem, Paragraph, Wrap};
use std::ops::Deref;
pub fn ui(f: &mut Frame, app: &App) {
if app.username.is_none() {
@ -181,10 +182,9 @@ fn render_status(f: &mut Frame, app: &App, rect: Rect) {
}
fn render_logs(f: &mut Frame, app: &App, rect: Rect) {
use ansi_to_tui::IntoText;
let logs = app.logs.lock().unwrap();
let logs = String::from_utf8(app.logs.lock().unwrap().deref().clone()).unwrap();
f.render_widget(
Paragraph::new(logs.into_text().unwrap())
Paragraph::new(logs)
.wrap(Wrap { trim: true })
.scroll((app.scroll_logs, 0))
.block(