From d161d55aaffcfc778f9cd129418a98049db0c18b Mon Sep 17 00:00:00 2001 From: Aabed Khan <39409020+TheAabedKhan@users.noreply.github.com> Date: Sun, 16 Jul 2023 11:31:01 +0545 Subject: [PATCH 1/9] fix: patched applications not showing at launch (#1031) --- .../widgets/homeView/installed_apps_card.dart | 108 +++++++++--------- 1 file changed, 55 insertions(+), 53 deletions(-) diff --git a/lib/ui/widgets/homeView/installed_apps_card.dart b/lib/ui/widgets/homeView/installed_apps_card.dart index 234ae3bd..e99dbaa0 100644 --- a/lib/ui/widgets/homeView/installed_apps_card.dart +++ b/lib/ui/widgets/homeView/installed_apps_card.dart @@ -8,24 +8,14 @@ import 'package:revanced_manager/ui/views/home/home_viewmodel.dart'; import 'package:revanced_manager/ui/widgets/shared/application_item.dart'; import 'package:revanced_manager/ui/widgets/shared/custom_card.dart'; -class InstalledAppsCard extends StatefulWidget { - const InstalledAppsCard({Key? key}) : super(key: key); +//ignore: must_be_immutable +class InstalledAppsCard extends StatelessWidget { + InstalledAppsCard({Key? key}) : super(key: key); - @override - State createState() => _InstalledAppsCardState(); -} - -class _InstalledAppsCardState extends State { List apps = locator().patchedInstalledApps; final ManagerAPI _managerAPI = locator(); List patchedApps = []; - @override - void initState() { - super.initState(); - _getApps(); - } - Future _getApps() async { if (apps.isNotEmpty) { patchedApps = [...apps]; @@ -41,54 +31,66 @@ class _InstalledAppsCardState extends State { apps.clear(); apps = [...patchedApps]; } - setState(() {}); } } @override Widget build(BuildContext context) { - return apps.isEmpty - ? CustomCard( - child: Center( - child: Column( - children: [ - Icon( - size: 40, - Icons.file_download_off, - color: Theme.of(context).colorScheme.secondary, - ), - const SizedBox(height: 16), - I18nText( - 'homeView.noInstallations', - child: Text( - '', - textAlign: TextAlign.center, - style: Theme.of(context).textTheme.titleMedium!.copyWith( - color: Theme.of(context).colorScheme.secondary, + return FutureBuilder( + future: _getApps(), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.done) { + return apps.isEmpty + ? CustomCard( + child: Center( + child: Column( + children: [ + Icon( + size: 40, + Icons.file_download_off, + color: Theme.of(context).colorScheme.secondary, + ), + const SizedBox(height: 16), + I18nText( + 'homeView.noInstallations', + child: Text( + '', + textAlign: TextAlign.center, + style: Theme.of(context) + .textTheme + .titleMedium! + .copyWith( + color: + Theme.of(context).colorScheme.secondary, + ), ), + ) + ], ), - ) - ], - ), - ), - ) - : ListView( - shrinkWrap: true, - padding: EdgeInsets.zero, - physics: const NeverScrollableScrollPhysics(), - children: apps - .map( - (app) => ApplicationItem( - icon: app.icon, - name: app.name, - patchDate: app.patchDate, - changelog: app.changelog, - isUpdatableApp: false, - onPressed: () => - locator().navigateToAppInfo(app), ), ) - .toList(), - ); + : ListView( + shrinkWrap: true, + padding: EdgeInsets.zero, + physics: const NeverScrollableScrollPhysics(), + children: apps + .map( + (app) => ApplicationItem( + icon: app.icon, + name: app.name, + patchDate: app.patchDate, + changelog: app.changelog, + isUpdatableApp: false, + onPressed: () => + locator().navigateToAppInfo(app), + ), + ) + .toList(), + ); + } else { + return const Center(child: CircularProgressIndicator()); + } + }, + ); } } From 4d6a57ddcfa537a479a152ae79f0931ccab53666 Mon Sep 17 00:00:00 2001 From: Pun Date: Sun, 16 Jul 2023 16:17:15 +0700 Subject: [PATCH 2/9] ci(analyze): restore run when commit push to `dev` branch --- .github/workflows/analyze.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index 3b961add..0f04ed2c 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -1,6 +1,11 @@ name: Analyze Code on: + push: + branches: [ "dev" ] + paths: + - "**.dart" + - ".github/workflows/analyze.yml" pull_request: branches: [ "main", "dev" ] paths: From d229ccb36c02b1fdf1f1c7bbceff5081a286345a Mon Sep 17 00:00:00 2001 From: Pun Date: Sun, 16 Jul 2023 16:21:16 +0700 Subject: [PATCH 3/9] ci(analyze): clarify job name that the job do static analysis & format checking --- .github/workflows/analyze.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index 0f04ed2c..9667ea5f 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -14,6 +14,7 @@ on: jobs: build: + name: "Static analysis & format check" runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 6495687841524cd82ab65990c9c44d53d377db6e Mon Sep 17 00:00:00 2001 From: Pun Date: Sun, 16 Jul 2023 16:31:08 +0700 Subject: [PATCH 4/9] docs: correct misspelling (EN_US) This correct spelling to English American, because by default, we use English US. --- fastlane/metadata/android/en-US/short_description.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/metadata/android/en-US/short_description.txt b/fastlane/metadata/android/en-US/short_description.txt index e4aa4492..15d7c30f 100644 --- a/fastlane/metadata/android/en-US/short_description.txt +++ b/fastlane/metadata/android/en-US/short_description.txt @@ -1 +1 @@ -Patch your favourite apps, right on your device. \ No newline at end of file +Patch your favorite apps, right on your device. From 2460acf0f4da26f702cb13ae002af75c20ea1ce7 Mon Sep 17 00:00:00 2001 From: Pun Date: Sun, 16 Jul 2023 17:10:29 +0700 Subject: [PATCH 5/9] ci(analyze): don't run when PR is in draft --- .github/workflows/analyze.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index 9667ea5f..e3f0f063 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -8,6 +8,11 @@ on: - ".github/workflows/analyze.yml" pull_request: branches: [ "main", "dev" ] + types: + - opened + - reopened + - synchronize + - ready_for_review paths: - "**.dart" - ".github/workflows/analyze.yml" From 159c85bd1f1e9432a806eaa76bc99b8ec0019529 Mon Sep 17 00:00:00 2001 From: Dhruvan Bhalara <53393418+dhruvanbhalara@users.noreply.github.com> Date: Sun, 16 Jul 2023 19:34:35 +0530 Subject: [PATCH 6/9] fix: close previous dialog when user reset the API URL (#1025) --- .../settings/settingsFragment/settings_manage_api_url.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ui/views/settings/settingsFragment/settings_manage_api_url.dart b/lib/ui/views/settings/settingsFragment/settings_manage_api_url.dart index 92b48895..c1b1ec2d 100644 --- a/lib/ui/views/settings/settingsFragment/settings_manage_api_url.dart +++ b/lib/ui/views/settings/settingsFragment/settings_manage_api_url.dart @@ -93,7 +93,9 @@ class SManageApiUrl extends BaseViewModel { onPressed: () { _managerAPI.setApiUrl(''); _toast.showBottom('settingsView.restartAppForChanges'); - Navigator.of(context).pop(); + Navigator.of(context) + ..pop() + ..pop(); }, ) ], From c5fc5ee93b32d3a5ba5911c89db7aadd39ea5d08 Mon Sep 17 00:00:00 2001 From: Pun Date: Wed, 19 Jul 2023 18:30:50 +0700 Subject: [PATCH 7/9] build: speed up compilation time faster build faster build faster build faster build faster build --- android/gradle.properties | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/gradle.properties b/android/gradle.properties index 94adc3a3..4b11638c 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,3 +1,6 @@ -org.gradle.jvmargs=-Xmx1536M +org.gradle.jvmargs=-Xmx1536M -XX:+UseParallelGC +org.gradle.parallel=true +org.gradle.daemon=true +org.gradle.caching=true android.useAndroidX=true android.enableJetifier=true From 06f0e599674c6c87e603c43ad7b710722da43920 Mon Sep 17 00:00:00 2001 From: Pun Date: Sat, 22 Jul 2023 13:21:13 +0700 Subject: [PATCH 8/9] chore(deps): update libsu to v5.2.0 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 52ecea22..c5917c80 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -59,7 +59,7 @@ dependencies: root: git: url: https://github.com/EvadeMaster/root - ref: 9bcf0dc06b8e2e3ccd5fbd16bc849938e817b36b + ref: 82803aa40f63cddff81c3e4d27ce8ce3e7c83f60 share_extend: ^2.0.0 shared_preferences: ^2.1.0 skeletons: ^0.0.3 From e49c19b3cdde2c8816a8a258719daaf5da539e3e Mon Sep 17 00:00:00 2001 From: Aunali321 Date: Sun, 23 Jul 2023 13:51:36 +0530 Subject: [PATCH 9/9] feat: support older version of android for reddit client patches --- android/app/src/main/AndroidManifest.xml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index e8307c84..69b3f6d6 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -2,23 +2,29 @@ package="app.revanced.manager.flutter"> + - - + + + - + +