about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRicky Kresslein <rk@lakoliu.com>2022-06-14 10:28:46 +0300
committerRicky Kresslein <rk@lakoliu.com>2022-06-14 10:28:46 +0300
commit174bfdc1111fb480b441cec8be5746d087e8a86e (patch)
tree4167ee0ba69cafe14c3300cb6629025eead88a1e /src
parenta64af13fb2f6837244359e6a18efb0e24fb56970 (diff)
downloadFurtherance-174bfdc1111fb480b441cec8be5746d087e8a86e.tar.zst
Use unstable-locales
Diffstat (limited to 'src')
-rwxr-xr-xsrc/ui/task_details.rs1
-rwxr-xr-xsrc/ui/window.rs4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/ui/task_details.rs b/src/ui/task_details.rs
index b8771ac..685e261 100755
--- a/src/ui/task_details.rs
+++ b/src/ui/task_details.rs
@@ -126,6 +126,7 @@ impl FurTaskDetails {
             task_box.set_homogeneous(true);
 
             let start_time = DateTime::parse_from_rfc3339(&task.start_time).unwrap();
+            Local.from_local_datetime(&start_time).unwrap();
             let mut start_time_str = start_time.format("%H:%M:%S").to_string();
             if !settings_manager::get_bool("show-seconds") {
                 start_time_str = start_time.format("%H:%M").to_string();
diff --git a/src/ui/window.rs b/src/ui/window.rs
index 1371eb1..81f5815 100755
--- a/src/ui/window.rs
+++ b/src/ui/window.rs
@@ -196,7 +196,7 @@ impl FurtheranceWindow {
             .connect_changed(clone!(@weak self as this => move |task_input| {
                 let imp2 = imp::FurtheranceWindow::from_instance(&this);
                 let task_input_text = task_input.text();
-                let split_tags: Vec<&str> = task_input_text.trim().split("#").collect();
+                let split_tags: Vec<&str> = task_input_text.trim().split('#').collect();
                 if split_tags[0].trim().is_empty() {
                     imp2.start_button.set_sensitive(false);
                 } else {
@@ -212,7 +212,7 @@ impl FurtheranceWindow {
                     let mut secs: i32 = 0;
                     let mut mins: i32 = pomodoro_time;
                     let mut hrs: i32 = mins / 60;
-                    mins = mins % 60;
+                    mins %= 60;
 
                     *imp2.running.lock().unwrap() = true;
                     *start_time.borrow_mut() = Local::now();