Commit Graph

1876 Commits

Author SHA1 Message Date
Naveen Singh
3f6ddaed2e Disable notification auto cancelling
Alarm/timer notifications shouldn't be dismissed automatically.
2025-03-18 19:58:44 +05:30
Naveen Singh
fc82299816 Merge pull request #132 from FossifyOrg/ask_notification_permission
Address some issues regarding missed alarms
2025-03-18 16:31:03 +05:30
Naveen Singh
22d0f69b29 Properly refresh alarms fragment
Adapter was being passed the same list of alarms over and over
2025-03-18 01:10:05 +05:30
Naveen Singh
2d3aa18e2c Properly disable expired alarms
- Moved duplicated code to an extension
 - Removed alarm clearing logic from alarms fragment as it's not necessary there. Instead, the alarms fragment is refreshed by `disableExpiredAlarm()`.
 - Disabled expired alarms when alarms are auto dismissed as well.
2025-03-18 01:09:01 +05:30
Naveen Singh
3b475642ce Always clear expired alarms
Same issue as 7d35b0413c.

Original code relied on the scheduled alarms returned by the system as a filter but the updated code by https://github.com/SimpleMobileTools/Simple-Clock/pull/469 clears/disables expired alarms when there are no enabled alarms which doesn't make much sense. One can not disable already disabled alarms
2025-03-17 21:32:28 +05:30
Naveen Singh
9ac0a4e1ac Ask for notification permission on startup
Previously, the app didn't ask for notification permission unless the user tried to enable/disable an alarm. This is a problem in case the notifications were turned off (for whatever reason) after an alarm was configured. The user would think that everything is ok and miss their alarm.

https://github.com/FossifyOrg/Clock/issues/89#issuecomment-2510246925
2025-03-17 19:41:49 +05:30
Naveen Singh
7d35b0413c Reschedule alarms properly
It seems faulty code was originally introduced in https://github.com/SimpleMobileTools/Simple-Clock/pull/469

Before that PR, the code rescheduled enabled alarms when there were no scheduled alarms according to the system APIs.

After that PR, the code rescheduled enabled alarms when there were NO enabled alarms enabled in the database i.e. a contradiction.

See https://github.com/FossifyOrg/Clock/issues/89
2025-03-17 18:27:23 +05:30
Naveen Singh
6dac731f6f Fix typo in variable name 2025-03-17 17:31:42 +05:30
Naveen Singh
e9afd550f0 Use safe context
Fixed crash `java.lang.IllegalStateException` in `updateAlarm()``
2025-03-17 16:52:28 +05:30
Naveen Singh
c3fe66251b Merge pull request #129 from FossifyOrg/fix_silent_alarms_113
Cancel notification when alarm is dismissed automatically
2025-03-16 02:02:54 +05:30
Naveen Singh
5e7b756257 Cancel alarm notification when alarm is auto dismissed
See https://github.com/FossifyOrg/Clock/issues/113
2025-03-16 01:12:56 +05:30
Naveen Singh
9221364ac9 Minor readability improvement 2025-03-15 23:50:52 +05:30
Naveen Singh
89979bef62 Use KTX extension 2025-03-15 17:49:17 +05:30
Naveen Singh
9f0111e384 Format some code 2025-03-15 17:47:25 +05:30
Naveen Singh
c6c0c6b761 Merge pull request #128 from FossifyOrg/fix_incorrect_toast
Fix misleading toast when disabling one-shot alarms
2025-03-15 11:54:38 +05:30
Naveen Singh
6df69d9f98 Avoid re-scheduling disabled one-shot alarms
https://github.com/FossifyOrg/Clock/issues/26
2025-03-15 00:04:56 +05:30
Naveen Singh
d957a56e34 Replace if with when and format code 2025-03-14 14:29:12 +05:30
Naveen Singh
1cc26e72a8 Merge pull request #99 from Joshix-1/master
Timezone aware scheduling of Alarms
2025-03-10 01:25:41 +05:30
Naveen Singh
6a749ee874 Merge pull request #126 from Aga-C/widget-open-tab
Fixed widget not respecting the tab setting (#125)
2025-03-10 01:03:45 +05:30
Agnieszka C
3599e0a8d5 Fixed widget not respecting the tab setting (#125) 2025-03-09 20:19:45 +01:00
Naveen Singh
6297777919 Avoid showing "0 minutes" as remaining time 2025-03-09 20:19:45 +05:30
Naveen Singh
b25ac8707b Rename snoozeTime back to snoozeMinutes 2025-03-09 19:07:03 +05:30
Naveen Singh
a3bc5da9e7 Minor readability improvement 2025-03-09 18:57:37 +05:30
Naveen Singh
f55fb2b433 Remove unnecessary recursion and simplify code 2025-03-09 18:55:27 +05:30
Naveen Singh
9b3d5a07b2 Remove unnecessary overload for setupAlarmClock() 2025-03-09 18:21:28 +05:30
Joshix
c1fac3559b update Context.setupAlarmClock 2025-03-09 11:00:00 +00:00
Joshix
49763b4664 remove weird snoozeAlarm method 2025-03-09 11:00:00 +00:00
Naveen Singh
a857d799d7 Merge branch 'master' into master 2025-03-09 08:19:49 +05:30
Naveen Singh
cadda80eb3 Merge pull request #112 from weblate/weblate-fossify-clock
Translations update from Hosted Weblate
2025-03-09 08:19:32 +05:30
Lula Bye
9f283a5bcb Translated using Weblate (French)
Currently translated at 100.0% (47 of 47 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/fr/
2025-03-08 22:07:32 +01:00
Naveen Singh
cfc764620b Merge branch 'master' into master 2025-03-07 19:25:50 +05:30
Jeff Huang
fa8b21fab8 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 100.0% (47 of 47 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/zh_Hant/
2025-03-07 13:50:45 +01:00
Dan
48b89621f8 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (47 of 47 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/uk/
2025-03-07 13:50:45 +01:00
en2sv
047a688534 Translated using Weblate (Swedish)
Currently translated at 100.0% (47 of 47 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/sv/
2025-03-07 13:50:45 +01:00
Sergio Marques
a0ef97abee Translated using Weblate (Portuguese)
Currently translated at 100.0% (47 of 47 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/pt/
2025-03-07 13:50:45 +01:00
Guillaume
15137ca2d5 Translated using Weblate (Dutch)
Currently translated at 100.0% (47 of 47 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/nl/
2025-03-07 13:50:45 +01:00
Bora Atıcı
6540e0f290 Translated using Weblate (Turkish)
Currently translated at 100.0% (47 of 47 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/tr/
2025-03-07 13:50:45 +01:00
LaKato
f82171fbe0 Translated using Weblate (Spanish)
Currently translated at 100.0% (47 of 47 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/es/
2025-03-07 13:50:45 +01:00
大王叫我来巡山
b932935b0c Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (47 of 47 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/zh_Hans/
2025-03-07 13:50:45 +01:00
Giovanni Donisi
f365a270b8 Translated using Weblate (Italian)
Currently translated at 100.0% (47 of 47 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/it/
2025-03-07 13:50:45 +01:00
solokot
68381347b6 Translated using Weblate (Russian)
Currently translated at 100.0% (47 of 47 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/ru/
2025-03-07 13:50:45 +01:00
LaKato
c3fe5557cc Translated using Weblate (Esperanto)
Currently translated at 100.0% (47 of 47 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/eo/
2025-03-07 13:50:45 +01:00
Josep M. Ferrer
8cffb47545 Translated using Weblate (Catalan)
Currently translated at 100.0% (47 of 47 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/ca/
2025-03-07 13:50:45 +01:00
Priit Jõerüüt
d51e5f7236 Translated using Weblate (Estonian)
Currently translated at 100.0% (47 of 47 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/et/
2025-03-07 13:50:45 +01:00
Aindriú Mac Giolla Eoin
98a4c9e1e7 Translated using Weblate (Irish)
Currently translated at 100.0% (47 of 47 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/ga/
2025-03-07 13:50:45 +01:00
VfBFan
04750d96ac Translated using Weblate (German)
Currently translated at 100.0% (47 of 47 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/de/
2025-03-07 13:50:45 +01:00
109247019824
2173ffed6c Translated using Weblate (Bulgarian)
Currently translated at 100.0% (47 of 47 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/bg/
2025-03-07 13:50:45 +01:00
Fjuro
67651fa281 Translated using Weblate (Czech)
Currently translated at 100.0% (47 of 47 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/cs/
2025-03-07 13:50:45 +01:00
Agnieszka C
4f603f925a Translated using Weblate (Polish)
Currently translated at 100.0% (47 of 47 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/pl/
2025-03-07 13:50:45 +01:00
Mikel Larreategi
4c3b7c9f7b Translated using Weblate (Basque)
Currently translated at 100.0% (46 of 46 strings)

Translation: Fossify/Clock
Translate-URL: https://hosted.weblate.org/projects/fossify/clock/eu/
2025-03-07 13:50:45 +01:00