Skip to content

Commit

Permalink
🚀 1.13.91-hotfix2+43
Browse files Browse the repository at this point in the history
Notification two days limit
  • Loading branch information
iqfareez committed Feb 19, 2021
1 parent ab5e056 commit 8ca653f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions lib/utils/prevent_update_notifs.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//If less than 3 days, since the last notif is scheduled, do not rescehdule
//3 days = 259200000 millis
//15 seconds = 15000
//4 hours = 14400000
//If less than 2 days, since the last notif is scheduled, do not rescehdule

import 'package:fluttertoast/fluttertoast.dart';
import 'package:get_storage/get_storage.dart';
import 'package:waktusolatmalaysia/CONSTANTS.dart';
Expand All @@ -22,7 +20,7 @@ class PreventUpdatingNotifs {
//check if same month or mot, notification will update if not in the month
if ((DateTime.now().millisecondsSinceEpoch -
GetStorage().read(kStoredLastUpdateNotif)) <
259200000) {
Duration(days: 2).inMilliseconds) {
//check if certain period o time has reached
dontUpdateNotification(GetStorage().read(kIsDebugMode));
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/views/Settings part/NotificationSettingPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class _NotificationPageSettingState extends State<NotificationPageSetting> {
builder: (BuildContext context) {
return AlertDialog(
content: Text(
'By default, notifications will get rescheduled on app reopening after three days since last scheduling.\n\nTap proceed to start an immediate notification scheduling. The app will be restart.'),
'By default, notification will not rescheduled if the last scheduler ran is less than two days.\n\nTap proceed to start an immediate notification scheduling. The app will be restarted.'),
actions: [
TextButton(
onPressed: () {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: App waktu solat seluruh Malaysia

publish_to: "none" # Remove this line if you wish to publish to pub.dev

version: 1.13.89-hotfix+42
version: 1.13.91-hotfix2+43

environment:
sdk: ">=2.7.0 <3.0.0"
Expand Down

0 comments on commit 8ca653f

Please sign in to comment.