From 3857896d6c1ebd608f46b89766eadc52e57229f6 Mon Sep 17 00:00:00 2001 From: Tihanyi Marcell Date: Mon, 12 Jun 2023 20:08:53 +0200 Subject: [PATCH 1/5] Ghost Grade title overflow fix --- filcnaplo_mobile_ui/lib/pages/grades/grade_subject_view.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filcnaplo_mobile_ui/lib/pages/grades/grade_subject_view.dart b/filcnaplo_mobile_ui/lib/pages/grades/grade_subject_view.dart index a260e28..a638637 100755 --- a/filcnaplo_mobile_ui/lib/pages/grades/grade_subject_view.dart +++ b/filcnaplo_mobile_ui/lib/pages/grades/grade_subject_view.dart @@ -280,7 +280,7 @@ class _GradeSubjectViewState extends State { void gradeCalc(BuildContext context) { // Scroll to the top of the page - _scrollController.animateTo(75, + _scrollController.animateTo(100, duration: const Duration(milliseconds: 500), curve: Curves.ease); calculatorProvider.clear(); From e255182b935226c7ab105eea1fba89414d3613c7 Mon Sep 17 00:00:00 2001 From: Tihanyi Marcell Date: Mon, 12 Jun 2023 20:09:11 +0200 Subject: [PATCH 2/5] Removed " " from login --- filcnaplo/lib/api/login.dart | 8 +++----- filcnaplo_kreta_api/lib/client/client.dart | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/filcnaplo/lib/api/login.dart b/filcnaplo/lib/api/login.dart index 0e2df02..9f3b2fd 100644 --- a/filcnaplo/lib/api/login.dart +++ b/filcnaplo/lib/api/login.dart @@ -57,15 +57,13 @@ Future loginApi({ String nonceStr = await Provider.of(context, listen: false) .getAPI(KretaAPI.nonce, json: false); - Nonce nonce = - getNonce(nonceStr, '${username.replaceAll(' ', '')} ', instituteCode); - headers.addAll(nonce.header()); + Nonce nonce = getNonce(nonceStr, username, instituteCode); Map? res = await Provider.of(context, listen: false) .postAPI(KretaAPI.login, headers: headers, body: User.loginBody( - username: '${username.replaceAll(' ', '')} ', + username: username, password: password, instituteCode: instituteCode, )); @@ -84,7 +82,7 @@ Future loginApi({ .getAPI(KretaAPI.student(instituteCode)); Student student = Student.fromJson(studentJson!); var user = User( - username: '${username.replaceAll(' ', '')} ', + username: username, password: password, instituteCode: instituteCode, name: student.name, diff --git a/filcnaplo_kreta_api/lib/client/client.dart b/filcnaplo_kreta_api/lib/client/client.dart index a859479..9910d60 100644 --- a/filcnaplo_kreta_api/lib/client/client.dart +++ b/filcnaplo_kreta_api/lib/client/client.dart @@ -169,7 +169,7 @@ class KretaClient { Map? loginRes = await postAPI(KretaAPI.login, headers: headers, body: User.loginBody( - username: loginUser.username.replaceAll(' ', '') + ' ', + username: loginUser.username, password: loginUser.password, instituteCode: loginUser.instituteCode, )); From 131454b99d07f3e39554131c3a7c662d13eefcc2 Mon Sep 17 00:00:00 2001 From: Tihanyi Marcell Date: Mon, 12 Jun 2023 20:09:27 +0200 Subject: [PATCH 3/5] Notification Capabilitie --- filcnaplo/ios/Runner/Runner.entitlements | 2 ++ 1 file changed, 2 insertions(+) diff --git a/filcnaplo/ios/Runner/Runner.entitlements b/filcnaplo/ios/Runner/Runner.entitlements index 123fc6c..36e7279 100644 --- a/filcnaplo/ios/Runner/Runner.entitlements +++ b/filcnaplo/ios/Runner/Runner.entitlements @@ -2,6 +2,8 @@ + aps-environment + development com.apple.security.application-groups group.refilcnaplo.livecard From f78a542be216ad6c00fda491a69630a9e8a814fc Mon Sep 17 00:00:00 2001 From: Tihanyi Marcell Date: Mon, 12 Jun 2023 20:09:48 +0200 Subject: [PATCH 4/5] iOS notification permission fix --- filcnaplo/lib/main.dart | 46 ++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/filcnaplo/lib/main.dart b/filcnaplo/lib/main.dart index 9f62e1e..9f5c788 100644 --- a/filcnaplo/lib/main.dart +++ b/filcnaplo/lib/main.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:background_fetch/background_fetch.dart'; import 'package:filcnaplo/api/providers/user_provider.dart'; import 'package:filcnaplo/api/providers/database_provider.dart'; @@ -53,26 +55,32 @@ class Startup { FlutterLocalNotificationsPlugin(); // Get permission to show notifications - flutterLocalNotificationsPlugin - .resolvePlatformSpecificImplementation< + if (Platform.isAndroid) { + await flutterLocalNotificationsPlugin + .resolvePlatformSpecificImplementation< AndroidFlutterLocalNotificationsPlugin>()! - .requestPermission(); - await flutterLocalNotificationsPlugin - .resolvePlatformSpecificImplementation< - IOSFlutterLocalNotificationsPlugin>() - ?.requestPermissions( - alert: false, - badge: true, - sound: true, - ); - await flutterLocalNotificationsPlugin - .resolvePlatformSpecificImplementation< - MacOSFlutterLocalNotificationsPlugin>() - ?.requestPermissions( - alert: false, - badge: true, - sound: true, - ); + .requestPermission(); + } + else if (Platform.isIOS) { + await flutterLocalNotificationsPlugin + .resolvePlatformSpecificImplementation< + IOSFlutterLocalNotificationsPlugin>() + ?.requestPermissions( + alert: false, + badge: true, + sound: true, + ); + } + else if (Platform.isMacOS) { + await flutterLocalNotificationsPlugin + .resolvePlatformSpecificImplementation< + MacOSFlutterLocalNotificationsPlugin>() + ?.requestPermissions( + alert: false, + badge: true, + sound: true, + ); + } // Platform specific settings final DarwinInitializationSettings initializationSettingsDarwin = From c474512088e45b18a7126455390c40385741dafa Mon Sep 17 00:00:00 2001 From: Tihanyi Marcell Date: Mon, 12 Jun 2023 20:11:15 +0200 Subject: [PATCH 5/5] Live Activity version update, build-ipa.sh --- filcnaplo/build-ipa.sh | 4 ++++ filcnaplo/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/filcnaplo/build-ipa.sh b/filcnaplo/build-ipa.sh index 4ed678f..53b8712 100755 --- a/filcnaplo/build-ipa.sh +++ b/filcnaplo/build-ipa.sh @@ -1,3 +1,7 @@ #!/bin/sh +flutter clean +dart pub get +flutter doctor -v + flutter build ipa --release --dart-define=APPVER=$(cat pubspec.yaml | grep version: | cut -d' ' -f2 | cut -d+ -f1) --no-tree-shake-icons diff --git a/filcnaplo/pubspec.yaml b/filcnaplo/pubspec.yaml index 5cf60ff..23ad74a 100644 --- a/filcnaplo/pubspec.yaml +++ b/filcnaplo/pubspec.yaml @@ -48,7 +48,7 @@ dependencies: crypto: ^3.0.2 elegant_notification: ^1.6.1 flutter_feather_icons: ^2.0.0+1 - live_activities: ^1.0.0 + live_activities: ^1.7.4 animated_flip_counter: ^0.2.5 lottie: ^1.4.3 rive: ^0.9.1