Skip to content

Commit

Permalink
Merge branch 'release/2.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-miasik committed Apr 14, 2022
2 parents c878f6d + fcd93cf commit 496950b
Show file tree
Hide file tree
Showing 9 changed files with 1,268 additions and 1,288 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

Unity Pomodoro is an open source countdown timer app created in Unity designed primarily for desktop use. Unity Pomodoro is a time management tool based on the pomodoro technique, the aim is to improve your productivity by introducing timers for both your work and break sessions. Quickly swap between the two timers to keep you on track and focused.

**Platforms**: Windows, Mac, & Linux. (Android coming soon!)
**Platforms**: Windows, Mac, & Linux. (Android in Beta! APK located in the releases page)

**Version**: 2.0.0
**Version**: 2.1.0

**Author**: **[`Adrian Miasik`](https://adrian-miasik.com)**

Expand All @@ -37,20 +37,24 @@ Want to help? If you're interested in contributing to the project, please see ou

 
## Downloads
### [Latest Release - v2.0.0](https://github.com/adrian-miasik/unity-pomodoro/releases/tag/v2.0.0)
### [Latest Release - v2.1.0](https://github.com/adrian-miasik/unity-pomodoro/releases/tag/v2.1.0)
#### Direct
- Windows
- [64-bit](https://github.com/adrian-miasik/unity-pomodoro/releases/download/v2.0.0/unity-pomodoro-2.0.0-windows-desktop-64-bit.zip)
- [32-bit](https://github.com/adrian-miasik/unity-pomodoro/releases/download/v2.0.0/unity-pomodoro-2.0.0-windows-desktop-32-bit.zip)
- [64-bit](https://github.com/adrian-miasik/unity-pomodoro/releases/download/v2.1.0/unity-pomodoro-2.1.0-windows-desktop-64-bit.zip)
- [32-bit](https://github.com/adrian-miasik/unity-pomodoro/releases/download/v2.1.0/unity-pomodoro-2.1.0-windows-desktop-32-bit.zip)
- Mac
- [Universal](https://github.com/adrian-miasik/unity-pomodoro/releases/download/v2.0.0/unity-pomodoro-2.0.0-mac-desktop-universal.zip)
- [Universal](https://github.com/adrian-miasik/unity-pomodoro/releases/download/v2.1.0/unity-pomodoro-2.1.0-mac-desktop-universal.zip)
- Linux
- [64-bit](https://github.com/adrian-miasik/unity-pomodoro/releases/download/v2.0.0/unity-pomodoro-2.0.0-linux-desktop-64-bit.zip)
- [64-bit](https://github.com/adrian-miasik/unity-pomodoro/releases/download/v2.1.0/unity-pomodoro-2.1.0-linux-desktop-64-bit.zip)
- Android
- [APK](https://github.com/adrian-miasik/unity-pomodoro/releases/download/v2.1.0/unity-pomodoro-2.1.0-android.apk)
#### Platform Specific
- [Microsoft Store (Universal Windows Platform)](https://www.microsoft.com/en-us/p/unity-pomodoro/9nbzqpmx9x7n)
- The UWP version provides **Windows Notifications** when the timer is complete.
- The UWP version provides **Windows Launcher** when a user interacts with a URL.
- Google Play Store (Coming Soon...)
### Previous Releases
- [v2.0.0 - Persistent Settings, Translucent Image Blur, Unity Analytics, Architecture, and Bugfixes!](https://github.com/adrian-miasik/unity-pomodoro/releases/tag/v2.0.0)
- [v1.9.0 - Release Media Generator & 'Set Pomodoro Count' Settings Option](https://github.com/adrian-miasik/unity-pomodoro/releases/tag/v1.9.0)
- [v1.8.0 - End Timestamp, Skip Button, Sidebar Improvements, Toggle Long Breaks, and More!](https://github.com/adrian-miasik/unity-pomodoro/tree/v1.8.0)
- [v1.7.1 - Long Breaks, Documentation, and Bugfixes](https://github.com/adrian-miasik/unity-pomodoro/tree/v1.7.1)
Expand Down
487 changes: 245 additions & 242 deletions UnityPomodoro/Assembly-CSharp-Editor.csproj

Large diffs are not rendered by default.

601 changes: 296 additions & 305 deletions UnityPomodoro/Assembly-CSharp.csproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion UnityPomodoro/Assets/AdrianMiasik/SVGs/icon-menu.svg.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion UnityPomodoro/Assets/AdrianMiasik/Scripts/PomodoroTimer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ public enum States
private double currentTime; // Current time left (In seconds)
private float totalTime; // Total time (In seconds)
private bool isTimerBeingSetup = true; // First time playing
#if UNITY_ANDROID
private TimeSpan focusLoss;
#endif

// Pause Fade Animation
private bool isFading;
Expand Down Expand Up @@ -167,17 +169,21 @@ private void OnApplicationFocus(bool hasFocus)

if (!hasFocus)
{
#if UNITY_ANDROID
// Cache the time we lost focus.
focusLoss = DateTime.Now.TimeOfDay;
#endif

Application.targetFrameRate = 0;
}
else
{
#if UNITY_ANDROID
// Calculate the new time progress based on our focus loss time.
double secondsPassedSinceFocusLoss = DateTime.Now.TimeOfDay.TotalSeconds - focusLoss.TotalSeconds;
currentTime -= secondsPassedSinceFocusLoss;

#endif

Application.targetFrameRate = Screen.currentResolution.refreshRate;
}
}
Expand Down
Loading

0 comments on commit 496950b

Please sign in to comment.