about summary refs log tree commit diff
path: root/src/ui/task_row.rs
diff options
context:
space:
mode:
authorRicky Kresslein <rk@lakoliu.com>2022-03-05 17:43:08 +0100
committerRicky Kresslein <rk@lakoliu.com>2022-03-05 17:43:08 +0100
commite2bbca53121f51c76bdfa54f0d239c8db5ca59be (patch)
tree2e7837a89f781093ba30cd9f810050b17f8cc11a /src/ui/task_row.rs
parent0f05a52d429c41b538fa3b362cad3a54db04e5cd (diff)
downloadFurtherance-e2bbca53121f51c76bdfa54f0d239c8db5ca59be.tar.zst
- Added 'delete confirmation' setting
- Added 'show seconds' setting
Diffstat (limited to 'src/ui/task_row.rs')
-rwxr-xr-xsrc/ui/task_row.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/task_row.rs b/src/ui/task_row.rs
index d17f263..cd0c69a 100755
--- a/src/ui/task_row.rs
+++ b/src/ui/task_row.rs
@@ -23,6 +23,7 @@ use glib::clone;
 
 use crate::database::Task;
 use crate::ui::FurTaskDetails;
+use crate::settings_manager;
 
 
 mod imp {
@@ -116,8 +117,11 @@ impl FurTaskRow {
         let h = total_time / 60 / 60;
         let m = (total_time / 60) - (h * 60);
         let s = total_time - (m * 60);
+        let mut total_time_str = format!("{:02}:{:02}:{:02}", h, m, s);
 
-        let total_time_str = format!("{:02}:{:02}:{:02}", h, m, s);
+        if !settings_manager::get_bool("show-seconds") {
+            total_time_str = format!("{:02}:{:02}", h, m);
+        }
 
         imp.total_time_label.set_text(&total_time_str);
     }