mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-04-30 22:14:25 +02:00
chore: merge dev
to main
(#976)
This commit is contained in:
commit
e78af6ae99
@ -53,7 +53,8 @@
|
|||||||
"widgetTitle": "Patcher",
|
"widgetTitle": "Patcher",
|
||||||
"patchButton": "Patch",
|
"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?",
|
"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": {
|
"appSelectorCard": {
|
||||||
"widgetTitle": "Select an application",
|
"widgetTitle": "Select an application",
|
||||||
|
@ -8,6 +8,8 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
|
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
|
||||||
import 'package:injectable/injectable.dart';
|
import 'package:injectable/injectable.dart';
|
||||||
import 'package:revanced_manager/models/patch.dart';
|
import 'package:revanced_manager/models/patch.dart';
|
||||||
|
import 'package:revanced_manager/services/manager_api.dart';
|
||||||
|
|
||||||
|
|
||||||
@lazySingleton
|
@lazySingleton
|
||||||
class GithubAPI {
|
class GithubAPI {
|
||||||
@ -63,7 +65,16 @@ class GithubAPI {
|
|||||||
final response = await _dio.get(
|
final response = await _dio.get(
|
||||||
'/repos/$repoName/releases',
|
'/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) {
|
} on Exception catch (e) {
|
||||||
if (kDebugMode) {
|
if (kDebugMode) {
|
||||||
print(e);
|
print(e);
|
||||||
|
@ -64,7 +64,7 @@ class PatcherViewModel extends BaseViewModel {
|
|||||||
builder: (context) => AlertDialog(
|
builder: (context) => AlertDialog(
|
||||||
title: I18nText('warning'),
|
title: I18nText('warning'),
|
||||||
backgroundColor: Theme.of(context).colorScheme.secondaryContainer,
|
backgroundColor: Theme.of(context).colorScheme.secondaryContainer,
|
||||||
content: I18nText('patcherView.armv7WarningDialogText'),
|
content: I18nText('patcherView.splitApkWarningDialogText'),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
CustomMaterialButton(
|
CustomMaterialButton(
|
||||||
label: I18nText('noButton'),
|
label: I18nText('noButton'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user