Skip to content

Commit

Permalink
Merge pull request #180 from dimipay/release/2.0.5+49
Browse files Browse the repository at this point in the history
Release/2.0.5+49
  • Loading branch information
sspzoa authored Sep 1, 2024
2 parents c06e872 + 8428f5f commit 0610c88
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 19 deletions.
4 changes: 3 additions & 1 deletion ios/fastlane/metadata/ko/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
여러분들의 편리한 학교 생활을 위해, 아래와 같은 수정이 이루어졌습니다.
-
- 로그아웃이 안되던 버그 수정
- 등록된 결제수단이 없는 경우 PIN을 요구하지 않도록 수정
- 기타 버그 수정 및 UI 개선
7 changes: 2 additions & 5 deletions ios/fastlane/metadata/review_information/notes.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
"디미고 구글 계정으로 로그인" 버튼을 길게(꾹) 눌러 "Email"과 "Password"로 로그인 할 수 있는 페이지로 진입 후, 로그인 해주세요.
Please log in to the page where you can log in to "Email" and "Password" by "Long Press"(press and hold) the "디미고 구글 계정으로 로그인" button.

Email: [email protected]
Password: test1234
"디미고 구글 계정으로 로그인" 버튼을 길게(꾹) 눌러 "이메일"과 "비밀번호"로 로그인 할 수 있는 페이지로 진입 후, 로그인 해주세요.
Please log in to the page where you can log in to "이메일" and "비밀번호" by "Long Press"(press and hold) the "디미고 구글 계정으로 로그인" button.

"카드 등록"은 결제를 위해 필요한 과정이며, 필수가 아닙니다. "나중에 할래요" 버튼을 통해 건너뛸 수 있습니다.
"카드 등록" is a necessary process for payment, and it is not required. You can skip it through the "나중에 할래요" button.
17 changes: 17 additions & 0 deletions lib/app/pages/home/controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ class HomePageController extends GetxController {

Future<void> prefetchAuthAndQR() async {
await Future.delayed(const Duration(milliseconds: 200));

while (paymentService.paymentMethods == null) {
await Future.delayed(const Duration(milliseconds: 100));
}

if (paymentService.paymentMethods!.isEmpty) {
return;
}

if (authService.bioKey.key == null) {
await biometricAuth();
}
Expand All @@ -147,6 +156,14 @@ class HomePageController extends GetxController {
}

Future<void> requestAuthAndQR() async {
while (paymentService.paymentMethods == null) {
await Future.delayed(const Duration(milliseconds: 100));
}

if (paymentService.paymentMethods!.isEmpty) {
return;
}

if (_selectedPaymentMethod.value == null) {
return;
}
Expand Down
29 changes: 17 additions & 12 deletions lib/app/services/push/repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,41 @@ import 'package:hive_flutter/hive_flutter.dart';
class PushRepository {
final ApiProvider api;
final String _hiveBoxName = 'pushService';
late final Box _hiveBox;

Future<void> _initHiveBox() async {
if (Hive.isBoxOpen(_hiveBoxName)) {
return;
}
_hiveBox = await Hive.openBox(_hiveBoxName);
}
Box? _hiveBox;

PushRepository({ApiProvider? api}) : api = api ?? Get.find<SecureApiProvider>();

Future<void> init() async {
await _initHiveBox();
}

Future<void> _initHiveBox() async {
if (_hiveBox != null) return;
if (!Hive.isBoxOpen(_hiveBoxName)) {
_hiveBox = await Hive.openBox(_hiveBoxName);
} else {
_hiveBox = Hive.box(_hiveBoxName);
}
}

Future<void> updateFcmTokenToServer(String token) async {
String url = "/fcm";
Map<String, dynamic> data = {'token': token};
await api.put(url, data: data);
}

Future<DateTime?> getTokenLastUpdated() async {
return await _hiveBox.get('pushTokenLastUpdated');
await _initHiveBox();
return _hiveBox?.get('pushTokenLastUpdated');
}

Future<void> setTokenLastUpdated(DateTime tokenLastUpdated) async {
await _hiveBox.put('pushTokenLastUpdated', tokenLastUpdated);
await _initHiveBox();
await _hiveBox?.put('pushTokenLastUpdated', tokenLastUpdated);
}

Future<void> deleteTokenLastUpdated() async {
await _hiveBox.delete('pushTokenLastUpdated');
await _initHiveBox();
await _hiveBox?.delete('pushTokenLastUpdated');
}
}
}
4 changes: 4 additions & 0 deletions lib/app/widgets/snackbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class DPSnackBar {
DPColors colorTheme = Theme.of(context).extension<DPColors>()!;
DPTypography textTheme = Theme.of(context).extension<DPTypography>()!;
HapticHelper.feedback(HapticPatterns.success, hapticType: HapticType.heavy);

if (Get.isSnackbarOpen) Get.closeCurrentSnackbar();
Get.rawSnackbar(
titleText: Center(
child: Text(
Expand All @@ -17,10 +19,12 @@ class DPSnackBar {
textAlign: TextAlign.center,
),
),
icon: Icon(Icons.info_outline_rounded, color: borderColor ?? colorTheme.primaryBrand,),
messageText: Container(),
backgroundColor: colorTheme.grayscale100,
borderColor: borderColor ?? colorTheme.primaryBrand,
borderRadius: 9999,
snackPosition: SnackPosition.TOP,
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
margin: const EdgeInsets.symmetric(horizontal: 24, vertical: 24),
animationDuration: const Duration(milliseconds: 500),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.

version: 2.0.4+48
version: 2.0.5+49

environment:
sdk: ">=3.2.3 <4.0.0"
Expand Down

0 comments on commit 0610c88

Please sign in to comment.