From 4a9a9f87af854909f5a794b5c79fe5619fb0c250 Mon Sep 17 00:00:00 2001 From: miakh <2659269+miakh@users.noreply.github.com> Date: Thu, 12 Dec 2024 18:11:05 +0100 Subject: [PATCH 1/5] force test fix --- lib/appConfig.dart | 2 +- lib/pages/NewsFormPage.dart | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/appConfig.dart b/lib/appConfig.dart index 9e342b23..612b6ddf 100644 --- a/lib/appConfig.dart +++ b/lib/appConfig.dart @@ -18,7 +18,7 @@ class AppConfig { static const int organization = 1; //setup occasion id to force occasion static const String? forceOccasionLink = null; - static const bool forceSendingNotificationAsTest = false; + static const bool isNotificationSendingDisabled = false; static const String webLink = "https://live.festapp.net"; static const String appStoreLink = "https://apps.apple.com/us/app/festapp/id6474078383"; diff --git a/lib/pages/NewsFormPage.dart b/lib/pages/NewsFormPage.dart index b4c5457d..50aace6f 100644 --- a/lib/pages/NewsFormPage.dart +++ b/lib/pages/NewsFormPage.dart @@ -54,7 +54,7 @@ class _NewsFormPageState extends State { Navigator.pop(context); } - Future _sendPressed({bool isTest = AppConfig.forceSendingNotificationAsTest, bool process = false}) async { + Future _sendPressed({bool isTest = false, bool process = false}) async { var htmlContent = await _controller.getText(); htmlContent = HtmlHelper.removeColor(htmlContent); if (process == true) { @@ -65,8 +65,8 @@ class _NewsFormPageState extends State { "content": htmlContent, "heading": _formKey.currentState?.fields["heading"]!.value, "heading_default": _currentUser!.name, - "with_notification": - _formKey.currentState?.fields["with_notification"]!.value, + "with_notification": AppConfig.isNotificationSendingDisabled == false ? + _formKey.currentState?.fields["with_notification"]!.value : false, if (isTest) "to": [AuthService.currentUserId()], if (isTest) "add_to_news": false, }; From b1e44d6093ccd07947c06e67c2df5d937719edc0 Mon Sep 17 00:00:00 2001 From: miakh <2659269+miakh@users.noreply.github.com> Date: Thu, 12 Dec 2024 18:14:23 +0100 Subject: [PATCH 2/5] more fixing --- lib/appConfig.dart | 2 +- lib/pages/NewsFormPage.dart | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/appConfig.dart b/lib/appConfig.dart index 612b6ddf..d2a3d627 100644 --- a/lib/appConfig.dart +++ b/lib/appConfig.dart @@ -18,7 +18,7 @@ class AppConfig { static const int organization = 1; //setup occasion id to force occasion static const String? forceOccasionLink = null; - static const bool isNotificationSendingDisabled = false; + static const bool isPublicNotificationSendingDisabled = false; static const String webLink = "https://live.festapp.net"; static const String appStoreLink = "https://apps.apple.com/us/app/festapp/id6474078383"; diff --git a/lib/pages/NewsFormPage.dart b/lib/pages/NewsFormPage.dart index 50aace6f..ed014b98 100644 --- a/lib/pages/NewsFormPage.dart +++ b/lib/pages/NewsFormPage.dart @@ -65,9 +65,8 @@ class _NewsFormPageState extends State { "content": htmlContent, "heading": _formKey.currentState?.fields["heading"]!.value, "heading_default": _currentUser!.name, - "with_notification": AppConfig.isNotificationSendingDisabled == false ? - _formKey.currentState?.fields["with_notification"]!.value : false, - if (isTest) "to": [AuthService.currentUserId()], + "with_notification": _formKey.currentState?.fields["with_notification"]!.value, + if (isTest || AppConfig.isPublicNotificationSendingDisabled) "to": [AuthService.currentUserId()], if (isTest) "add_to_news": false, }; Navigator.pop(context, toReturn); From 26ab6cd3cc55f344993a493bd4191b22e78dee9d Mon Sep 17 00:00:00 2001 From: miakh <2659269+miakh@users.noreply.github.com> Date: Wed, 18 Dec 2024 15:40:22 +0100 Subject: [PATCH 3/5] clean --- lib/pages/CheckPage.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/pages/CheckPage.dart b/lib/pages/CheckPage.dart index 04c657b5..c21ccb02 100644 --- a/lib/pages/CheckPage.dart +++ b/lib/pages/CheckPage.dart @@ -165,7 +165,6 @@ class _CheckPageState extends State { formats: [BarcodeFormat.qrCode], detectionSpeed: DetectionSpeed.noDuplicates); - @override @override Widget build(BuildContext context) { const minChildSize = 0.25; From d58be173195698623cb52d0cd8979d2a5b6643a7 Mon Sep 17 00:00:00 2001 From: miakh <2659269+miakh@users.noreply.github.com> Date: Wed, 18 Dec 2024 22:04:57 +0100 Subject: [PATCH 4/5] tab string --- lib/components/timeline/ScheduleTabView.dart | 2 +- lib/styles/StylesConfig.dart | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/components/timeline/ScheduleTabView.dart b/lib/components/timeline/ScheduleTabView.dart index 91b0e8ac..8d68c3ab 100644 --- a/lib/components/timeline/ScheduleTabView.dart +++ b/lib/components/timeline/ScheduleTabView.dart @@ -67,7 +67,7 @@ class _ScheduleTabViewState extends State { for (var e in datedEvents) Tab( child: Text( - e.dateTime!.weekdayToString(context), + StylesConfig.formatDateTimeForTab(context, e.dateTime!), style: StylesConfig.timeLineTabNameTextStyle, maxLines: 1, ), diff --git a/lib/styles/StylesConfig.dart b/lib/styles/StylesConfig.dart index 7ca9cf73..6314f250 100644 --- a/lib/styles/StylesConfig.dart +++ b/lib/styles/StylesConfig.dart @@ -1,5 +1,7 @@ import 'package:flutter/material.dart'; +import 'package:fstapp/services/TimeHelper.dart'; import 'package:fstapp/themeConfig.dart'; +import 'package:intl/intl.dart'; class StylesConfig { // Text styles @@ -32,4 +34,8 @@ class StylesConfig { backgroundColor: ThemeConfig.seed2, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), ); + + static String formatDateTimeForTab(BuildContext context, DateTime time){ + return time.weekdayToString(context); + } } \ No newline at end of file From 12662966106e78171c7ab1ea442d3831f69d7925 Mon Sep 17 00:00:00 2001 From: miakh <2659269+miakh@users.noreply.github.com> Date: Thu, 19 Dec 2024 22:36:13 +0100 Subject: [PATCH 5/5] packages update --- lib/components/timeline/ScheduleTimeline.dart | 2 +- lib/widgets/ScheduleTimeline.dart | 2 +- pubspec.yaml | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/components/timeline/ScheduleTimeline.dart b/lib/components/timeline/ScheduleTimeline.dart index 33861e09..c3df231a 100644 --- a/lib/components/timeline/ScheduleTimeline.dart +++ b/lib/components/timeline/ScheduleTimeline.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:fstapp/components/timeline/ScheduleTimelineHelper.dart'; import 'package:fstapp/styles/StylesConfig.dart'; import 'package:fstapp/themeConfig.dart'; -import 'package:timelines/timelines.dart'; +import 'package:timelines_plus/timelines_plus.dart'; class ScheduleTimeline extends StatefulWidget { final Function(int)? onEventPressed; diff --git a/lib/widgets/ScheduleTimeline.dart b/lib/widgets/ScheduleTimeline.dart index 70cfdd61..515fcb79 100644 --- a/lib/widgets/ScheduleTimeline.dart +++ b/lib/widgets/ScheduleTimeline.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:fstapp/dataModels/EventModel.dart'; import 'package:fstapp/styles/StylesConfig.dart'; import 'package:fstapp/themeConfig.dart'; -import 'package:timelines/timelines.dart'; +import 'package:timelines_plus/timelines_plus.dart'; enum DotType { diff --git a/pubspec.yaml b/pubspec.yaml index 822520c8..28b596ca 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -33,7 +33,7 @@ dependencies: flutter: sdk: flutter flutter_svg: ^2.0.16 - fluttertoast: ^8.2.8 + fluttertoast: ^8.2.10 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. @@ -43,9 +43,9 @@ dependencies: flutter_map_marker_popup: ^7.0.0 # flutter_map_marker_popup: # path: ./pckgs/flutter_map_marker_popup-master - supabase_flutter: ^2.8.1 + supabase_flutter: ^2.8.2 flutter_secure_storage: ^9.2.2 - timelines: ^0.1.0 + timelines_plus: ^1.0.4 intl: ^0.19.0 search_page: ^2.3.0 badges: ^3.1.1 @@ -63,7 +63,7 @@ dependencies: path_provider: ^2.1.5 select_dialog: ^2.0.1 onesignal_flutter: ^5.2.7 - package_info_plus: ^8.1.1 + package_info_plus: ^8.1.2 flutter_animate: ^4.5.2 easy_localization: ^3.0.7 flutter_map_cancellable_tile_provider: ^3.0.2 @@ -79,7 +79,7 @@ dependencies: flutter_map_animations: ^0.8.0 auto_route: ^9.2.2 adaptive_theme: ^3.6.0 - connectivity_plus: ^6.1.0 + connectivity_plus: ^6.1.1 dev_dependencies: auto_route_generator: ^9.0.0