From ee9ead8b3984908f0d40707e5643787e27018885 Mon Sep 17 00:00:00 2001 From: dsnallfot <72826201+dsnallfot@users.noreply.github.com> Date: Sun, 26 May 2024 09:14:57 +0200 Subject: [PATCH] adjust m sedan --- LoopFollow/Application/Base.lproj/Main.storyboard | 6 +++--- LoopFollow/Controllers/Timers.swift | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/LoopFollow/Application/Base.lproj/Main.storyboard b/LoopFollow/Application/Base.lproj/Main.storyboard index fe1e25be..92632ac0 100644 --- a/LoopFollow/Application/Base.lproj/Main.storyboard +++ b/LoopFollow/Application/Base.lproj/Main.storyboard @@ -1,9 +1,9 @@ - + - + @@ -63,7 +63,7 @@ - + diff --git a/LoopFollow/Controllers/Timers.swift b/LoopFollow/Controllers/Timers.swift index a73de571..f97b6fb0 100644 --- a/LoopFollow/Controllers/Timers.swift +++ b/LoopFollow/Controllers/Timers.swift @@ -56,20 +56,20 @@ extension MainViewController { let formatter = DateComponentsFormatter() formatter.unitsStyle = .positional // Use the appropriate positioning for the current locale - if secondsAgo >= 720 { // 720 seconds = 12 minutes + //if secondsAgo >= 720 { // 720 seconds = 12 minutes formatter.allowedUnits = [.minute] // Only show minutes after 12 minutes have passed /*} else if secondsAgo < 0 { // Less than 4.5 minutes //Daniel: ALways show minutes and seconds formatter.allowedUnits = [.minute] // Show only minutes if less than 4.5 minutes*/ - } else { + //} else { formatter.allowedUnits = [.minute, .second] // Show minutes and seconds otherwise - } + //} let formattedDuration = formatter.string(from: secondsAgo) ?? "" let minAgoDisplayText: String if secondsAgo > 60 { - minAgoDisplayText = formattedDuration + " sedan" + minAgoDisplayText = formattedDuration + " m sedan" } else { minAgoDisplayText = formattedDuration + " s sedan" }