Skip to content

Commit

Permalink
new gif
Browse files Browse the repository at this point in the history
  • Loading branch information
aduryagin committed Dec 4, 2022
1 parent 2f29476 commit aac99bf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Work Timer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
61C6F976293B93DB00BC66F8 /* Work_Timer.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Work_Timer.entitlements; sourceTree = "<group>"; };
61C6F97E293BA91700BC66F8 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
61C6F980293BD70900BC66F8 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
61C6F981293BDAB700BC66F8 /* Work-Timer.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "Work-Timer.gif"; sourceTree = "<group>"; };
61C6F983293C70EE00BC66F8 /* Progress.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Progress.swift; sourceTree = "<group>"; };
61C6F989293C7E6900BC66F8 /* Work-Timer.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "Work-Timer.gif"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -43,7 +43,7 @@
isa = PBXGroup;
children = (
61C6F980293BD70900BC66F8 /* README.md */,
61C6F981293BDAB700BC66F8 /* Work-Timer.gif */,
61C6F989293C7E6900BC66F8 /* Work-Timer.gif */,
61C6F96C293B93DA00BC66F8 /* Work Timer */,
61C6F96B293B93DA00BC66F8 /* Products */,
);
Expand Down
4 changes: 3 additions & 1 deletion Work Timer/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct ContentView: View {
let workSessionSeconds: Double = 25 * 60 // 25 min
let workDaySeconds: Double = 400 * 60 // 400 min
let timer = Timer.publish(every: 1, on: .main, in: .common).autoconnect()
@State var counter: Double = 99 * 60 + 55
@State var counter: Double = 0
@State var isTimerRunning = false

func formatTime(_ seconds: Double) -> String {
Expand Down Expand Up @@ -84,6 +84,7 @@ struct ContentView: View {
Button {
let index = floor(counter / workSessionSeconds) - 1
counter = index * workSessionSeconds
let _ = updateTrayMins(inProgress: false)
} label: {
Image(systemName: "chevron.left")
}.disabled(counter == 0)
Expand All @@ -103,6 +104,7 @@ struct ContentView: View {
Button {
let index = floor(counter / workSessionSeconds) + 1
counter = index * workSessionSeconds
let _ = updateTrayMins(inProgress: false)
} label: {
Image(systemName: "chevron.right")
}.disabled(counter == workDaySeconds)
Expand Down
Binary file modified Work-Timer.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit aac99bf

Please sign in to comment.