Sesu8642 / InfusionTimer

Tea timer for Gong Fu and western style brewing for true enthusiasts.
GNU General Public License v3.0
12 stars 2 forks source link

[Improvement] Remember tea session state on leaving to tea index page #5

Closed geronime closed 2 years ago

geronime commented 2 years ago

Very low priority nice to have: If I leave the tea detail page back to the tea index page and then go back to the tea detail page the tea session state is forgotten. It would be nice to remember the state of the last tea session (potentially with 24 hours TTL) so that if I accidentally tap the back button (similarly I do the back gesture by mistake or my phone decides to close the app) the app still remembers which infusion I am supposed to brew next.

Sesu8642 commented 2 years ago

Ideas from #4 (use case: storing leaves and continue brewing later):

geronime commented 2 years ago

Works for me just fine :)

Sesu8642 commented 2 years ago

@geronime @THardi what do you think about this? The current infusion is now being saved. If the app is killed or the user uses the back arrow during an infusion, it is assumed that the infusion was finished. This does not fully solve the accidental back button / gesture use case but I think it is good enough for now.

There is no TTL because that would clash with the use case of storing tea for a while after doing some infusions.

@THardi there is no warning about the last infusion being finished because for most use cases that just means their session is done and no action needs to be taken. However, you can now see that you are brewing the last infusion and can discard your tea right after that.

The information about the current session is deleted when:

I am also looking for feedback about the wording and design. Is it easy to understand and looks alright? I decided against a wording like "Infusion 2/3" because that could be interpreted as "the second infusion is the next one" or "the second infusion was done already".

Peek 2022-02-13 11-17

THardi commented 2 years ago

It's time for a beta.

Sesu8642 commented 2 years ago

@THardi I can't find proper documentation on how to publish a pre-release on F-Droid. What I can do is publish one on GitHub. But that would mean that you had to uninstall the current version and thereby lose your custom teas. Of course you could to a backup or use a different device. Would that be an option for you?

THardi commented 2 years ago

@THardi I can't find proper documentation on how to publish a pre-release on F-Droid. What I can do is publish one on GitHub. But that would mean that you had to uninstall the current version and thereby lose your custom teas. Of course you could to a backup or use a different device. Would that be an option for you?

Yes, it's a good idea.

Sesu8642 commented 2 years ago

see Release 1.2.0-rc.1

geronime commented 2 years ago

Great job @Sesu8642, looking forward to the release.

The wording looks ok; I would probably choose "2 infusion(s) remaining" instead of "to go". Both is fine though.

Sesu8642 commented 2 years ago

Thanks for your feedback @geronime! I will probably change the text to that. The next release might come even sooner than I anticipated if F-Droid picks up the pre-release... ;D

THardi commented 2 years ago

Hello. I just did the 4th of 5 infusions. After that the counter was back to 1. So <Infusion 4/5>, back, no display "current brew...", back in, <Infusion 1/5>.

Sesu8642 commented 2 years ago

Good catch, @THardi. I fixed it. It will now only be reset after doing the last infusion. Besides that, does it work well for your use case?

THardi commented 2 years ago

@Sesu8642

The text "<Infusion 1/5>" could be a bit larger, simply in relation to the circle and the seconds it contains.

But what I particularly noticed: the alarm duration is ok for the moment, but I was just outside the room and didn't hear it. Is there a way to program a repeat until confirmed or until go back? I will release the notification for my watch, but it would be good for everyone else to do it again. Simply the 2 "tones" and after 30 s again...

But, all in all, it gives me a memory aid for my infusions. Thanks

PS: In landscape format, the text below disappears. Can this be placed next to the timer? Screenshot_20220218-164317

Sesu8642 commented 2 years ago

@THardi Thanks for your feedback! I increased the infusion text and button size.

For the "other room" use case, I created #10. But I probably wont start implementing it soon.

I am sure that putting the text next to the when the screen gets too small is technically possible. However, it would probably not lead to very elegant code. What you can do right now is scroll the lower area to reach the buttons. Maybe I can hide the tea information at the top if the screen height gets too small. I will have a look at it.

Edit: I was able to change the scrolling behavior so that the information on top is hidden by default if the screen is too small but you can still scroll up to see it.

THardi commented 2 years ago

@Sesu8642 No problem. i just noticed it. it doesn't bother me personally. it was just an idea to round it off visually.

geronime commented 2 years ago

Hello @Sesu8642 and thanks a lot for the release. The new interface is awesome.

I think I found a small bug: Once I finish the last brew and tap the main control bubble to go back to index page it still shows that one more infusion is remaining. Brewing the last infusion one more time and going back clears the stored session. (App v1.2.0) Update: if I fast forward all the way to the last infusion, run it and then click the bubble to go back, the session is properly cleared. However you can reproduce it like this: Fast forward to the second last infusion and time it, then tap the bubble to fast forward and start the last infusion. Once it finishes, tapping the bubble to go back to the index page shows that the session was not cleared and one more infusion is remaining.

Sesu8642 commented 2 years ago

@geronime Thank you for the detailed report! This one is a little tricky. I must have introduced the bug when fixing the other one. But I think I got it right this time ;) I will release a fixed version soon.