From 338efb1eba1a0533944511fe1cc0d48eadfab629 Mon Sep 17 00:00:00 2001 From: vishnukvmd Date: Thu, 24 Nov 2022 16:15:58 +0530 Subject: [PATCH 1/6] v1.0.19 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 63c828ec1b..81107be7f4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: ente_auth description: ente two-factor authenticator -version: 1.0.18+18 +version: 1.0.19+19 publish_to: none environment: From f53b44ec970f40de9784daaafc1e2418ad6c4a69 Mon Sep 17 00:00:00 2001 From: vishnukvmd Date: Thu, 24 Nov 2022 16:23:41 +0530 Subject: [PATCH 2/6] Remove unused library --- pubspec.lock | 7 ------- pubspec.yaml | 1 - 2 files changed, 8 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 27ef5adab2..c367de06a3 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -609,13 +609,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.2.2" - in_app_purchase: - dependency: "direct main" - description: - name: in_app_purchase - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.2" intl: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 81107be7f4..dad872b723 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -44,7 +44,6 @@ dependencies: fluttertoast: ^8.1.1 google_nav_bar: ^5.0.5 #supported http: ^0.13.4 - in_app_purchase: ^0.5.2 intl: ^0.17.0 json_annotation: ^4.5.0 local_auth: ^1.1.5 From d7e1998fbd431ef5abe9f709c6f144f0a032ad75 Mon Sep 17 00:00:00 2001 From: vishnukvmd Date: Thu, 24 Nov 2022 16:23:47 +0530 Subject: [PATCH 3/6] v1.0.20 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index dad872b723..77fea59172 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: ente_auth description: ente two-factor authenticator -version: 1.0.19+19 +version: 1.0.20+20 publish_to: none environment: From bacca876ae67c2450a6f5a0f655d44749e34502e Mon Sep 17 00:00:00 2001 From: vishnukvmd Date: Mon, 28 Nov 2022 13:05:07 +0530 Subject: [PATCH 4/6] Remove usages of IAP --- lib/main.dart | 2 -- lib/services/billing_service.dart | 28 ---------------------------- 2 files changed, 30 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 9c8886fe43..de3ce54723 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -17,7 +17,6 @@ import 'package:ente_auth/ui/tools/app_lock.dart'; import 'package:ente_auth/ui/tools/lock_screen.dart'; import 'package:ente_auth/utils/crypto_util.dart'; import "package:flutter/material.dart"; -import 'package:in_app_purchase/in_app_purchase.dart'; import 'package:logging/logging.dart'; import 'package:path_provider/path_provider.dart'; @@ -59,7 +58,6 @@ Future _runWithLogs(Function() function, {String prefix = ""}) async { } Future _init(bool bool, {String via}) async { - InAppPurchaseConnection.enablePendingPurchases(); CryptoUtil.init(); await PreferenceService.instance.init(); await CodeStore.instance.init(); diff --git a/lib/services/billing_service.dart b/lib/services/billing_service.dart index 46636d2bbc..36febf96ce 100644 --- a/lib/services/billing_service.dart +++ b/lib/services/billing_service.dart @@ -8,7 +8,6 @@ import 'package:ente_auth/core/errors.dart'; import 'package:ente_auth/core/network.dart'; import 'package:ente_auth/models/billing_plan.dart'; import 'package:ente_auth/models/subscription.dart'; -import 'package:in_app_purchase/in_app_purchase.dart'; import 'package:logging/logging.dart'; const kWebPaymentRedirectUrl = "https://payments.ente.io/frameRedirect"; @@ -36,33 +35,6 @@ class BillingService { Future _future; Future init() async { - if (Platform.isAndroid || Platform.isIOS) { - InAppPurchaseConnection.enablePendingPurchases(); - // if (Platform.isIOS && kDebugMode) { - // await FlutterInappPurchase.instance.initConnection; - // FlutterInappPurchase.instance.clearTransactionIOS(); - // } - InAppPurchaseConnection.instance.purchaseUpdatedStream - .listen((purchases) { - if (_isOnSubscriptionPage) { - return; - } - for (final purchase in purchases) { - if (purchase.status == PurchaseStatus.purchased) { - verifySubscription( - purchase.productID, - purchase.verificationData.serverVerificationData, - ).then((response) { - if (response != null) { - InAppPurchaseConnection.instance.completePurchase(purchase); - } - }); - } else if (Platform.isIOS && purchase.pendingCompletePurchase) { - InAppPurchaseConnection.instance.completePurchase(purchase); - } - } - }); - } } void clearCache() { From 0aae349509a65852f3419537306ccc64f40c1eaa Mon Sep 17 00:00:00 2001 From: vishnukvmd Date: Mon, 28 Nov 2022 13:05:13 +0530 Subject: [PATCH 5/6] Update POD file --- ios/Podfile.lock | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 0b2fa5f6c3..7ac74b5480 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -64,15 +64,11 @@ PODS: - FMDB (2.7.5): - FMDB/standard (= 2.7.5) - FMDB/standard (2.7.5) - - in_app_purchase (0.0.1): - - Flutter - local_auth (0.0.1): - Flutter - move_to_background (0.0.1): - Flutter - MTBBarcodeScanner (5.0.11) - - open_file (0.0.1): - - Flutter - OrderedSet (5.0.0) - package_info_plus (0.4.5): - Flutter @@ -115,10 +111,8 @@ DEPENDENCIES: - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) - flutter_sodium (from `.symlinks/plugins/flutter_sodium/ios`) - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) - - in_app_purchase (from `.symlinks/plugins/in_app_purchase/ios`) - local_auth (from `.symlinks/plugins/local_auth/ios`) - move_to_background (from `.symlinks/plugins/move_to_background/ios`) - - open_file (from `.symlinks/plugins/open_file/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) - qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`) @@ -166,14 +160,10 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/flutter_sodium/ios" fluttertoast: :path: ".symlinks/plugins/fluttertoast/ios" - in_app_purchase: - :path: ".symlinks/plugins/in_app_purchase/ios" local_auth: :path: ".symlinks/plugins/local_auth/ios" move_to_background: :path: ".symlinks/plugins/move_to_background/ios" - open_file: - :path: ".symlinks/plugins/open_file/ios" package_info_plus: :path: ".symlinks/plugins/package_info_plus/ios" path_provider_ios: @@ -207,11 +197,9 @@ SPEC CHECKSUMS: flutter_sodium: c84426b4de738514b5b66cfdeb8a06634e72fe0b fluttertoast: 74526702fea2c060ea55dde75895b7e1bde1c86b FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a - in_app_purchase: 3e2155afa9d03d4fa32d9e62d567885080ce97d6 local_auth: 1740f55d7af0a2e2a8684ce225fe79d8931e808c move_to_background: 39a5b79b26d577b0372cbe8a8c55e7aa9fcd3a2d MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb - open_file: 02eb5cb6b21264bd3a696876f5afbfb7ca4f4b7d OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 From 17fc973bfb75017b6e280a3138ec49c83c771f7f Mon Sep 17 00:00:00 2001 From: vishnukvmd Date: Mon, 28 Nov 2022 13:06:27 +0530 Subject: [PATCH 6/6] Pause and resume camera on Android --- lib/ui/scanner_page.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/ui/scanner_page.dart b/lib/ui/scanner_page.dart index d0b35ef432..408372e2c5 100644 --- a/lib/ui/scanner_page.dart +++ b/lib/ui/scanner_page.dart @@ -57,6 +57,11 @@ class ScannerPageState extends State { void _onQRViewCreated(QRViewController controller) { this.controller = controller; + // h4ck to remove black screen on Android scanners: https://github.com/juliuscanute/qr_code_scanner/issues/560#issuecomment-1159611301 + if (Platform.isAndroid) { + controller.pauseCamera(); + controller.resumeCamera(); + } controller.scannedDataStream.listen((scanData) { try { final code = Code.fromRawData(scanData.code!);