Fix market overview
This commit is contained in:
@@ -137,7 +137,7 @@ struct Property(&'static str, String);
|
||||
|
||||
impl Formatted for MarketOverview {
|
||||
fn get_formatted(&self) -> Vec<String> {
|
||||
vec![
|
||||
let mut o = vec![
|
||||
Property("TREND", format!("{}", self.trend)),
|
||||
Property("VOLATILITY", format!("{}", self.volatility)),
|
||||
Property(
|
||||
@@ -149,7 +149,14 @@ impl Formatted for MarketOverview {
|
||||
},
|
||||
),
|
||||
]
|
||||
.get_formatted()
|
||||
.get_formatted();
|
||||
|
||||
o.push(format!(
|
||||
"\n{}",
|
||||
apply_padding(self.alerts.get_formatted()).join("\n")
|
||||
));
|
||||
|
||||
o
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -226,14 +226,13 @@ impl App for PulseTradeApp {
|
||||
.await,
|
||||
),
|
||||
),
|
||||
(LayoutItem::Widget(Size::Flex(1)), {
|
||||
let mo = self.market_overview.lock().await;
|
||||
Box::new(format!(
|
||||
" MARKET OVERVIEW\n{}\n\n{}",
|
||||
apply_padding(mo.get_formatted()).join("\n"),
|
||||
apply_padding(mo.alerts.get_formatted()).join("\n")
|
||||
))
|
||||
}),
|
||||
(
|
||||
LayoutItem::Widget(Size::Flex(1)),
|
||||
Box::new(
|
||||
advanced_draw(&self.scroll, 2, "MARKET OVERVIEW", &self.market_overview)
|
||||
.await,
|
||||
),
|
||||
),
|
||||
]),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user