vanthomiy / Sleepest

MIT License
3 stars 0 forks source link

Wrong next alarm #156

Closed FabiM96 closed 3 years ago

FabiM96 commented 3 years ago

If I set an alarm for tomorrow and change the sleep time to be in sleep time now, the foreground service doesn't start. But if i choose the actual day instead of tomorrow, the service starts although the latest wakeup of the alarm of today is already over.

Maybe this occurs if the app is reinstalled and there wasn't a alarm in the morning.

FabiM96 commented 3 years ago

https://user-images.githubusercontent.com/79595252/135116103-d9c02214-9ae5-4c2e-8f49-cbc1be96eb63.mp4

I've added a video. You can see the status of the service in the bar at the top.

vanthomiy commented 3 years ago

I have the same issue. But disable alarm works as expected

FabiM96 commented 3 years ago

Maybe you can add another check at getNextActiveAlarm() for this case

vanthomiy commented 3 years ago

I dont know what to say.

vanthomiy commented 3 years ago

I'm looking for a quick fix. Stay tuned @FabiM96 ;)

vanthomiy commented 3 years ago

Actual pull should fix the issue. But we should monitor if its working in the morning as well as expected.

vanthomiy commented 3 years ago

It should work with the new version of the main.