Skip to content

Commit

Permalink
feat: dont display seconds in dpns screen last updated column (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldelucia authored Nov 20, 2024
1 parent 68cdd20 commit d6cc46a
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/ui/dpns_contested_names_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,14 @@ impl DPNSContestedNamesScreen {
let relative_time =
HumanTime::from(datetime).to_string();

ui.label(relative_time);
if relative_time.contains("seconds") {
ui.label("now");
} else {
ui.label(relative_time);
}
} else {
// Handle case where the timestamp is invalid
ui.label("Invalid timestamp");
// Handle case where the timestamp is invalid
ui.label("Invalid timestamp");
}
} else {
ui.label("Fetching");
Expand Down Expand Up @@ -529,7 +533,11 @@ impl DPNSContestedNamesScreen {
let relative_time =
HumanTime::from(datetime).to_string();

ui.label(relative_time);
if relative_time.contains("seconds") {
ui.label("now");
} else {
ui.label(relative_time);
}
} else {
// Handle case where the timestamp is invalid
ui.label("Invalid timestamp");
Expand Down

0 comments on commit d6cc46a

Please sign in to comment.