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