Skip to content

Commit

Permalink
adjust m sedan
Browse files Browse the repository at this point in the history
  • Loading branch information
dsnallfot committed May 26, 2024
1 parent 951f7d3 commit ee9ead8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions LoopFollow/Application/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="49e-Tb-3d3">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="49e-Tb-3d3">
<device id="retina5_9" orientation="portrait" appearance="dark"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
<capability name="Image references" minToolsVersion="12.0"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
Expand Down Expand Up @@ -63,7 +63,7 @@
<constraints>
<constraint firstAttribute="width" constant="110" id="gHb-pq-HbG"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
Expand Down
8 changes: 4 additions & 4 deletions LoopFollow/Controllers/Timers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit ee9ead8

Please sign in to comment.