timer-machine / timer-machine-android

⏲ A highly customizable interval timer app for Android
GNU General Public License v3.0
193 stars 16 forks source link

Exercise dont save in stats if finished before end #26

Closed iulko closed 1 year ago

iulko commented 1 year ago

If you stop the timer using the stop button before it ends, it never shows in the stats. Please fix.

DeweyReed commented 1 year ago

Hi! Saving something into stats means it's done, and stopping a timer before its end doesn't count as "finished."

iulko commented 1 year ago

Thanks for info.

The thing I want to do is set a timer that is a infinite loop (cant do this now in the program so I set the loop to 1000) and than stop the timer when im done doing my stuff. So I have a loop but no specific end time for it.

Could we have an option to save the stats for incomplete timer runs? Ofc if its not a big hassle to add.

DeweyReed commented 1 year ago

The real problem is determining when the app should save the stats.

Now, you can add an end step to the timer with a duration of 1 second, and instead of stopping the timer through the stop button, you could jump to the end step(by double-tapping the step number) and let it finish automatically. This way should save the stats.

iulko commented 1 year ago

Yes, I already figured out this work around before.

Would be nice to just add an option for "Save incomplete timers in stats" or a support for inifnite timers/loops that end when you press stop.

But I know this is not a piority, would be just a nice addition. I'm sure there is more people who want to do something until they need to stop for some reason.

Thanks for great app

DeweyReed commented 1 year ago

There are two ways to create infinite timers, as mentioned here.

Adding incomplete runs into the stats would swamp the stats. I'm figuring out a better way to determine when to add a run into the stats.

iulko commented 1 year ago

I tried the 2 solution even before I wrote this issue, I didnt know there was a FAQ. Its the most clean one. Stats saved. Only problem I had with it is that there is that variables reset on each new timer starting so I cant use TTS to tell me which minute of the total time, total loop count etc Would have to be a new set of variables.

DeweyReed commented 1 year ago

Losing track of TTS variables is one of the tradeoffs that come with an infinite timer. I can't think of a proper solution for now. :D

iulko commented 1 year ago

Well I guess the only solution is to introduce infinite loops (maybe when you set loop count to 0) and when there is infinite loop running than saving to stats on pressing stop button. I also cant see another solution to make it clean.

DeweyReed commented 1 year ago

Messing with the loop number will introduce problems with other aspects, like TTS variables. Adding the stat after several minutes of a run would be a solution, but deciding the exact time is hard.

iulko commented 1 year ago

Is there a specific reason why a stop button cant save the stats?

DeweyReed commented 1 year ago

Saving a record means something is done. But manually stopping it interrupts the run, and the run won't get marked as completed.

Many users would also start a timer and stop it immediately. Saving every run would create a lot of short-lived and meaningless runs.