From 4100d7a391155c579d45a0128317990da30c3365 Mon Sep 17 00:00:00 2001 From: Aabed Khan <39409020+TheAabedKhan@users.noreply.github.com> Date: Sat, 1 Jul 2023 05:25:30 +0545 Subject: [PATCH 1/2] fix: different message when trying to patch spilt apk (#973) --- assets/i18n/en_US.json | 3 ++- lib/ui/views/patcher/patcher_viewmodel.dart | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/i18n/en_US.json b/assets/i18n/en_US.json index e49a4d61ee..0c61436fba 100644 --- a/assets/i18n/en_US.json +++ b/assets/i18n/en_US.json @@ -53,7 +53,8 @@ "widgetTitle": "Patcher", "patchButton": "Patch", "patchDialogText": "You have selected a resource patch and a split APK installation has been detected, so patching errors may occur.\nAre you sure you want to proceed?", - "armv7WarningDialogText": "Patching on ARMv7 devices is not yet supported and might fail. Proceed anyways?" + "armv7WarningDialogText": "Patching on ARMv7 devices is not yet supported and might fail. Proceed anyways?", + "splitApkWarningDialogText": "Patching a split APK is not yet supported and might fail. Proceed anyways?" }, "appSelectorCard": { "widgetTitle": "Select an application", diff --git a/lib/ui/views/patcher/patcher_viewmodel.dart b/lib/ui/views/patcher/patcher_viewmodel.dart index f97f131024..68f353979c 100644 --- a/lib/ui/views/patcher/patcher_viewmodel.dart +++ b/lib/ui/views/patcher/patcher_viewmodel.dart @@ -64,7 +64,7 @@ class PatcherViewModel extends BaseViewModel { builder: (context) => AlertDialog( title: I18nText('warning'), backgroundColor: Theme.of(context).colorScheme.secondaryContainer, - content: I18nText('patcherView.armv7WarningDialogText'), + content: I18nText('patcherView.splitApkWarningDialogText'), actions: [ CustomMaterialButton( label: I18nText('noButton'), From 6fe05cd86e206052baf23afd1254d31ce02a7def Mon Sep 17 00:00:00 2001 From: Aabed Khan <39409020+TheAabedKhan@users.noreply.github.com> Date: Sat, 1 Jul 2023 05:26:03 +0545 Subject: [PATCH 2/2] feat: show all the unseen changelogs on changelog section (#970) --- lib/services/github_api.dart | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/services/github_api.dart b/lib/services/github_api.dart index ed0bec52cd..973b9d0982 100644 --- a/lib/services/github_api.dart +++ b/lib/services/github_api.dart @@ -8,6 +8,8 @@ import 'package:flutter/foundation.dart'; import 'package:flutter_cache_manager/flutter_cache_manager.dart'; import 'package:injectable/injectable.dart'; import 'package:revanced_manager/models/patch.dart'; +import 'package:revanced_manager/services/manager_api.dart'; + @lazySingleton class GithubAPI { @@ -63,7 +65,16 @@ class GithubAPI { final response = await _dio.get( '/repos/$repoName/releases', ); - return response.data[0]; + final Map releases = response.data[0]; + int updates = 0; + final String currentVersion = await ManagerAPI().getCurrentManagerVersion(); + while (response.data[updates]['tag_name'] != 'v$currentVersion') { + updates++; + } + for(int i = 1; i < updates; i++){ + releases.update('body', (value) => value + '\n' + '# '+ response.data[i]['tag_name']+'\n' + response.data[i]['body']); + } + return releases; } on Exception catch (e) { if (kDebugMode) { print(e);