Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: merge dev to main #976

Merged
merged 2 commits into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion assets/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
13 changes: 12 additions & 1 deletion lib/services/github_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -63,7 +65,16 @@ class GithubAPI {
final response = await _dio.get(
'/repos/$repoName/releases',
);
return response.data[0];
final Map<String, dynamic> 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);
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/patcher/patcher_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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: <Widget>[
CustomMaterialButton(
label: I18nText('noButton'),
Expand Down