mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: immediately show or hide time when includeTime changes
This commit is contained in:
parent
2e60459878
commit
a413746c05
@ -51,7 +51,7 @@ impl DateTypeOptionPB {
|
|||||||
let date = format!("{}", utc.format_with_items(StrftimeItems::new(fmt)));
|
let date = format!("{}", utc.format_with_items(StrftimeItems::new(fmt)));
|
||||||
|
|
||||||
let mut time = "".to_string();
|
let mut time = "".to_string();
|
||||||
if has_time {
|
if has_time && self.include_time {
|
||||||
let fmt = format!("{} {}", self.date_format.format_str(), self.time_format.format_str());
|
let fmt = format!("{} {}", self.date_format.format_str(), self.time_format.format_str());
|
||||||
time = format!("{}", utc.format_with_items(StrftimeItems::new(&fmt))).replace(&date, "");
|
time = format!("{}", utc.format_with_items(StrftimeItems::new(&fmt))).replace(&date, "");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user