Compare commits

..

4 Commits

Author SHA1 Message Date
semantic-release-bot
1997e474f2 chore(release): 1.0.0-dev.1 [skip ci]
# [1.0.0-dev.1](https://github.com/revanced/revanced-manager/compare/v0.0.57...v1.0.0-dev.1) (2023-04-29)

### Bug Fixes

* fix broken manager update implmentation ([6492507](6492507d0e))
* **i18n:** update translation for `refreshSucess` ([b286444](b286444ad9))
* open contributor links externally ([#791](https://github.com/revanced/revanced-manager/issues/791)) ([f0b0282](f0b028279c))
* resized monochrome icon to match the original ([#789](https://github.com/revanced/revanced-manager/issues/789)) ([ac830cb](ac830cbe7f))
* update pubspec version ([65da6af](65da6af3f9))

* chore!: merge `dev` to `main` (#830) ([782c012](782c0127b1)), closes [#830](https://github.com/revanced/revanced-manager/issues/830)

### Features

* add continue anyway button to select from storage dialog ([#810](https://github.com/revanced/revanced-manager/issues/810)) ([affba66](affba669ce))
* add option to import/export keystore ([#776](https://github.com/revanced/revanced-manager/issues/776)) ([dca2d4f](dca2d4fe12))
* appreciation message for new contributors ([0a1f2da](0a1f2da33d))
* auto select default patches ([4c9cb56](4c9cb560e3))
* change `continue anyways` to `cancel` ([cfc866b](cfc866bef2))
* **ci:** update crowdin workflow to use new main branch ([ded59d2](ded59d2da0))
* confirmation dialog for deleting keystore ([#764](https://github.com/revanced/revanced-manager/issues/764)) ([054afbb](054afbbedd))
* disable selecting installed apps for nonroot ([bb681e3](bb681e31c9))
* improve suggested app version text ([#822](https://github.com/revanced/revanced-manager/issues/822)) ([ad17995](ad17995f28))
* improve ux ([#752](https://github.com/revanced/revanced-manager/issues/752)) ([3b677f8](3b677f8ae3)), closes [#782](https://github.com/revanced/revanced-manager/issues/782)
* progress bar for manager updates ([f5aafdb](f5aafdb7d6))
* remove notice about stale development [skip ci] ([62f7a82](62f7a820d8))
* resetting source to default dismiss the sources pop-up ([#797](https://github.com/revanced/revanced-manager/issues/797)) ([62ef1c8](62ef1c88fe))
* trim extra space when setting custom source ([#771](https://github.com/revanced/revanced-manager/issues/771)) ([37b583f](37b583f560))
* warning for armv7 devices ([cdfb09f](cdfb09fbfa))

### BREAKING CHANGES

* this is to release as 1.0.0
2023-04-29 19:19:25 +00:00
Aunali321
6492507d0e fix: fix broken manager update implmentation 2023-04-30 00:39:42 +05:30
semantic-release-bot
3091f441ea chore(release): 1.0.0 [skip ci]
# [1.0.0](https://github.com/revanced/revanced-manager/compare/v0.0.57...v1.0.0) (2023-04-29)

### Bug Fixes

* **i18n:** update translation for `refreshSucess` ([b286444](b286444ad9))
* open contributor links externally ([#791](https://github.com/revanced/revanced-manager/issues/791)) ([f0b0282](f0b028279c))
* resized monochrome icon to match the original ([#789](https://github.com/revanced/revanced-manager/issues/789)) ([ac830cb](ac830cbe7f))
* update pubspec version ([65da6af](65da6af3f9))

* chore!: merge `dev` to `main` (#830) ([782c012](782c0127b1)), closes [#830](https://github.com/revanced/revanced-manager/issues/830)

### Features

* add continue anyway button to select from storage dialog ([#810](https://github.com/revanced/revanced-manager/issues/810)) ([affba66](affba669ce))
* add option to import/export keystore ([#776](https://github.com/revanced/revanced-manager/issues/776)) ([dca2d4f](dca2d4fe12))
* appreciation message for new contributors ([0a1f2da](0a1f2da33d))
* auto select default patches ([4c9cb56](4c9cb560e3))
* change `continue anyways` to `cancel` ([cfc866b](cfc866bef2))
* **ci:** update crowdin workflow to use new main branch ([ded59d2](ded59d2da0))
* confirmation dialog for deleting keystore ([#764](https://github.com/revanced/revanced-manager/issues/764)) ([054afbb](054afbbedd))
* disable selecting installed apps for nonroot ([bb681e3](bb681e31c9))
* improve suggested app version text ([#822](https://github.com/revanced/revanced-manager/issues/822)) ([ad17995](ad17995f28))
* improve ux ([#752](https://github.com/revanced/revanced-manager/issues/752)) ([3b677f8](3b677f8ae3)), closes [#782](https://github.com/revanced/revanced-manager/issues/782)
* progress bar for manager updates ([f5aafdb](f5aafdb7d6))
* remove notice about stale development [skip ci] ([62f7a82](62f7a820d8))
* resetting source to default dismiss the sources pop-up ([#797](https://github.com/revanced/revanced-manager/issues/797)) ([62ef1c8](62ef1c88fe))
* trim extra space when setting custom source ([#771](https://github.com/revanced/revanced-manager/issues/771)) ([37b583f](37b583f560))
* warning for armv7 devices ([cdfb09f](cdfb09fbfa))

### BREAKING CHANGES

* this is to release as 1.0.0
2023-04-29 18:16:26 +00:00
Palm
782c0127b1 chore!: merge dev to main (#830)
BREAKING CHANGE: this is to release as 1.0.0
2023-04-30 01:06:26 +07:00
21 changed files with 203 additions and 144 deletions

View File

@@ -1,50 +0,0 @@
name: "Release Build"
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up JDK 12
uses: actions/setup-java@v3
with:
java-version: "12"
distribution: "zulu"
- uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Set up Flutter
run: flutter pub get
- name: Generate files with Builder
run: flutter packages pub run build_runner build --delete-conflicting-outputs
- name: Build with Flutter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }}
run: flutter build apk
- name: Sign APK
id: sign_apk
uses: ilharp/sign-android-release@v1
with:
releaseDir: build/app/outputs/apk/release
signingKey: ${{ secrets.SIGNING_KEYSTORE }}
keyStorePassword: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }}
keyAlias: ${{ secrets.SIGNING_KEY_ALIAS }}
keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}
- name: Add version to APK
run: mv ${{steps.sign_apk.outputs.signedFile}} revanced-manager-${{ env.RELEASE_VERSION }}.apk
- name: Publish release APK
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: revanced-manager-${{ env.RELEASE_VERSION }}.apk

5
.gitignore vendored
View File

@@ -138,7 +138,4 @@ app.*.map.json
.firebase
# Dependency directories
node_modules/
# FVM
.fvm
node_modules/

View File

@@ -1 +1,74 @@
# [1.0.0-dev.1](https://github.com/revanced/revanced-manager/compare/v0.0.57...v1.0.0-dev.1) (2023-04-29)
### Bug Fixes
* fix broken manager update implmentation ([6492507](https://github.com/revanced/revanced-manager/commit/6492507d0e0015b594f7d9e97bbadee9501b29d6))
* **i18n:** update translation for `refreshSucess` ([b286444](https://github.com/revanced/revanced-manager/commit/b286444ad93fc6009412ac14b996ff6268069811))
* open contributor links externally ([#791](https://github.com/revanced/revanced-manager/issues/791)) ([f0b0282](https://github.com/revanced/revanced-manager/commit/f0b028279c69f97817952063d84809d3e486ad6e))
* resized monochrome icon to match the original ([#789](https://github.com/revanced/revanced-manager/issues/789)) ([ac830cb](https://github.com/revanced/revanced-manager/commit/ac830cbe7f3b1ebd7849e586b829d3c077436a0d))
* update pubspec version ([65da6af](https://github.com/revanced/revanced-manager/commit/65da6af3f96550b138dcaf61832a5de23f529b32))
* chore!: merge `dev` to `main` (#830) ([782c012](https://github.com/revanced/revanced-manager/commit/782c0127b1f6f5380bd8ca23c8c2f280e2bfc432)), closes [#830](https://github.com/revanced/revanced-manager/issues/830)
### Features
* add continue anyway button to select from storage dialog ([#810](https://github.com/revanced/revanced-manager/issues/810)) ([affba66](https://github.com/revanced/revanced-manager/commit/affba669ce1ca6866a1dd1bd801e3f33e4bfe051))
* add option to import/export keystore ([#776](https://github.com/revanced/revanced-manager/issues/776)) ([dca2d4f](https://github.com/revanced/revanced-manager/commit/dca2d4fe126a6966a094d335e0f27bb62d76c5e8))
* appreciation message for new contributors ([0a1f2da](https://github.com/revanced/revanced-manager/commit/0a1f2da33da7d44f0613b19f3e6b2b7b50240548))
* auto select default patches ([4c9cb56](https://github.com/revanced/revanced-manager/commit/4c9cb560e3e38295a5140419f2565b478cb6c497))
* change `continue anyways` to `cancel` ([cfc866b](https://github.com/revanced/revanced-manager/commit/cfc866bef2497bc1675bf5dea834cea59d9cc969))
* **ci:** update crowdin workflow to use new main branch ([ded59d2](https://github.com/revanced/revanced-manager/commit/ded59d2da0d193b2dea4a5a7f2fc8eefaceecc0a))
* confirmation dialog for deleting keystore ([#764](https://github.com/revanced/revanced-manager/issues/764)) ([054afbb](https://github.com/revanced/revanced-manager/commit/054afbbedd70a1933d8241ff5b63a772f90b555f))
* disable selecting installed apps for nonroot ([bb681e3](https://github.com/revanced/revanced-manager/commit/bb681e31c9c4e8a5b7b0c883edd1bc5c28505627))
* improve suggested app version text ([#822](https://github.com/revanced/revanced-manager/issues/822)) ([ad17995](https://github.com/revanced/revanced-manager/commit/ad17995f2883682f67eb42b1f82ca865fba86ef9))
* improve ux ([#752](https://github.com/revanced/revanced-manager/issues/752)) ([3b677f8](https://github.com/revanced/revanced-manager/commit/3b677f8ae3739c079e2116417fef6ed395c2ff06)), closes [#782](https://github.com/revanced/revanced-manager/issues/782)
* progress bar for manager updates ([f5aafdb](https://github.com/revanced/revanced-manager/commit/f5aafdb7d6f51386b667abbccf7f2521ef664ba5))
* remove notice about stale development [skip ci] ([62f7a82](https://github.com/revanced/revanced-manager/commit/62f7a820d8ee2506376306e119698d427de745ef))
* resetting source to default dismiss the sources pop-up ([#797](https://github.com/revanced/revanced-manager/issues/797)) ([62ef1c8](https://github.com/revanced/revanced-manager/commit/62ef1c88fe0352d3962f8c73edff4b99ea347c0f))
* trim extra space when setting custom source ([#771](https://github.com/revanced/revanced-manager/issues/771)) ([37b583f](https://github.com/revanced/revanced-manager/commit/37b583f560910c0b5da2a8e64de9b53f5a26bb56))
* warning for armv7 devices ([cdfb09f](https://github.com/revanced/revanced-manager/commit/cdfb09fbfa8e74d84ddcc91565489c3c5b61dfa2))
### BREAKING CHANGES
* this is to release as 1.0.0
# [1.0.0](https://github.com/revanced/revanced-manager/compare/v0.0.57...v1.0.0) (2023-04-29)
### Bug Fixes
* **i18n:** update translation for `refreshSucess` ([b286444](https://github.com/revanced/revanced-manager/commit/b286444ad93fc6009412ac14b996ff6268069811))
* open contributor links externally ([#791](https://github.com/revanced/revanced-manager/issues/791)) ([f0b0282](https://github.com/revanced/revanced-manager/commit/f0b028279c69f97817952063d84809d3e486ad6e))
* resized monochrome icon to match the original ([#789](https://github.com/revanced/revanced-manager/issues/789)) ([ac830cb](https://github.com/revanced/revanced-manager/commit/ac830cbe7f3b1ebd7849e586b829d3c077436a0d))
* update pubspec version ([65da6af](https://github.com/revanced/revanced-manager/commit/65da6af3f96550b138dcaf61832a5de23f529b32))
* chore!: merge `dev` to `main` (#830) ([782c012](https://github.com/revanced/revanced-manager/commit/782c0127b1f6f5380bd8ca23c8c2f280e2bfc432)), closes [#830](https://github.com/revanced/revanced-manager/issues/830)
### Features
* add continue anyway button to select from storage dialog ([#810](https://github.com/revanced/revanced-manager/issues/810)) ([affba66](https://github.com/revanced/revanced-manager/commit/affba669ce1ca6866a1dd1bd801e3f33e4bfe051))
* add option to import/export keystore ([#776](https://github.com/revanced/revanced-manager/issues/776)) ([dca2d4f](https://github.com/revanced/revanced-manager/commit/dca2d4fe126a6966a094d335e0f27bb62d76c5e8))
* appreciation message for new contributors ([0a1f2da](https://github.com/revanced/revanced-manager/commit/0a1f2da33da7d44f0613b19f3e6b2b7b50240548))
* auto select default patches ([4c9cb56](https://github.com/revanced/revanced-manager/commit/4c9cb560e3e38295a5140419f2565b478cb6c497))
* change `continue anyways` to `cancel` ([cfc866b](https://github.com/revanced/revanced-manager/commit/cfc866bef2497bc1675bf5dea834cea59d9cc969))
* **ci:** update crowdin workflow to use new main branch ([ded59d2](https://github.com/revanced/revanced-manager/commit/ded59d2da0d193b2dea4a5a7f2fc8eefaceecc0a))
* confirmation dialog for deleting keystore ([#764](https://github.com/revanced/revanced-manager/issues/764)) ([054afbb](https://github.com/revanced/revanced-manager/commit/054afbbedd70a1933d8241ff5b63a772f90b555f))
* disable selecting installed apps for nonroot ([bb681e3](https://github.com/revanced/revanced-manager/commit/bb681e31c9c4e8a5b7b0c883edd1bc5c28505627))
* improve suggested app version text ([#822](https://github.com/revanced/revanced-manager/issues/822)) ([ad17995](https://github.com/revanced/revanced-manager/commit/ad17995f2883682f67eb42b1f82ca865fba86ef9))
* improve ux ([#752](https://github.com/revanced/revanced-manager/issues/752)) ([3b677f8](https://github.com/revanced/revanced-manager/commit/3b677f8ae3739c079e2116417fef6ed395c2ff06)), closes [#782](https://github.com/revanced/revanced-manager/issues/782)
* progress bar for manager updates ([f5aafdb](https://github.com/revanced/revanced-manager/commit/f5aafdb7d6f51386b667abbccf7f2521ef664ba5))
* remove notice about stale development [skip ci] ([62f7a82](https://github.com/revanced/revanced-manager/commit/62f7a820d8ee2506376306e119698d427de745ef))
* resetting source to default dismiss the sources pop-up ([#797](https://github.com/revanced/revanced-manager/issues/797)) ([62ef1c8](https://github.com/revanced/revanced-manager/commit/62ef1c88fe0352d3962f8c73edff4b99ea347c0f))
* trim extra space when setting custom source ([#771](https://github.com/revanced/revanced-manager/issues/771)) ([37b583f](https://github.com/revanced/revanced-manager/commit/37b583f560910c0b5da2a8e64de9b53f5a26bb56))
* warning for armv7 devices ([cdfb09f](https://github.com/revanced/revanced-manager/commit/cdfb09fbfa8e74d84ddcc91565489c3c5b61dfa2))
### BREAKING CHANGES
* this is to release as 1.0.0

View File

@@ -98,6 +98,7 @@ linter:
- prefer_const_declarations
- prefer_const_literals_to_create_immutables
- prefer_contains
- prefer_equal_for_default_values
- prefer_final_fields
- prefer_final_in_for_each
- prefer_final_locals

View File

@@ -30,6 +30,7 @@ android {
ndkVersion flutter.ndkVersion
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
@@ -48,6 +49,7 @@ android {
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
buildTypes {
@@ -71,10 +73,21 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// ReVanced
implementation "app.revanced:revanced-patcher:9.0.0"
implementation "app.revanced:revanced-patcher:7.0.0"
// Signing & aligning
implementation("org.bouncycastle:bcpkix-jdk15on:1.70")
implementation("com.android.tools.build:apksig:7.2.2")
// MicroG cronet
implementation("org.microg:cronet-common:$cronetVersion")
implementation("org.microg:cronet-native:$cronetVersion")
// Core libraries
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
// Window
implementation 'androidx.window:window:1.0.0'
implementation 'androidx.window:window-java:1.0.0'
}

View File

@@ -1,4 +1,5 @@
buildscript {
ext.cronetVersion = '102.5005.125'
ext.kotlin_version = '1.7.10'
repositories {
google()
@@ -31,6 +32,6 @@ subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
task clean(type: Delete) {
delete rootProject.buildDir
}

View File

@@ -1,7 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionSha256Sum=6147605a23b4eff6c334927a86ff3508cb5d6722cd624c97ded4c2e8640f1f87
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@@ -49,7 +49,7 @@
"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. Proceed anyways?"
},
"appSelectorCard": {
"widgetTitle": "Select an application",
@@ -78,7 +78,7 @@
"errorMessage": "Unable to use selected application",
"downloadToast": "Download function is not available yet",
"featureNotAvailable": "Feature not implemented",
"featureNotAvailableText": "This application is a split APK and cannot be selected. Unfortunately, this feature is only available for rooted users at the moment. However, you can still install the application by selecting its APK files from your device's storage instead"
"featureNotAvailableText": "This feature has not been added yet for non-root. You'll need to select APK files from storage for now."
},
"patchesSelectorView": {
"viewTitle": "Select patches",

View File

@@ -7,12 +7,13 @@ import 'package:dio_cache_interceptor/dio_cache_interceptor.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
import 'package:injectable/injectable.dart';
import 'package:native_dio_adapter/native_dio_adapter.dart';
import 'package:revanced_manager/models/patch.dart';
@lazySingleton
class GithubAPI {
late Dio _dio = Dio();
final _cacheOptions = CacheOptions(
store: MemCacheStore(),
maxStale: const Duration(days: 1),
@@ -32,6 +33,22 @@ class GithubAPI {
Future<void> initialize(String repoUrl) async {
try {
if (Platform.isIOS || Platform.isMacOS || Platform.isAndroid) {
final CronetEngine androidCronetEngine = await CronetEngine.build(
userAgent: 'ReVanced Manager',
enableBrotli: true,
enableQuic: true,
);
_dio.httpClientAdapter =
NativeAdapter(androidCronetEngine: androidCronetEngine);
_dio = Dio(
BaseOptions(
baseUrl: repoUrl,
),
);
}
_dio = Dio(
BaseOptions(
baseUrl: repoUrl,
@@ -90,7 +107,7 @@ class GithubAPI {
final List<dynamic> commits = response.data;
return commits
.map(
(commit) => commit['commit']['message'].split('\n')[0] +
(commit) => (commit['commit']['message']).split('\n')[0] +
' - ' +
commit['commit']['author']['name'] +
'\n' as String,
@@ -109,7 +126,8 @@ class GithubAPI {
String repoName,
) async {
try {
final Map<String, dynamic>? release = await getLatestRelease(repoName);
final Map<String, dynamic>? release =
await getLatestRelease(repoName);
if (release != null) {
final Map<String, dynamic>? asset =
(release['assets'] as List<dynamic>).firstWhereOrNull(
@@ -148,7 +166,8 @@ class GithubAPI {
Future<String> getLastestReleaseVersion(String repoName) async {
try {
final Map<String, dynamic>? release = await getLatestRelease(repoName);
final Map<String, dynamic>? release =
await getLatestRelease(repoName);
if (release != null) {
return release['tag_name'];
} else {

View File

@@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:developer';
import 'dart:io';
import 'package:collection/collection.dart';
@@ -7,7 +8,9 @@ import 'package:dio_cache_interceptor/dio_cache_interceptor.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
import 'package:injectable/injectable.dart';
import 'package:native_dio_adapter/native_dio_adapter.dart';
import 'package:revanced_manager/models/patch.dart';
import 'package:revanced_manager/utils/check_for_gms.dart';
import 'package:timeago/timeago.dart';
@lazySingleton
@@ -22,12 +25,34 @@ class RevancedAPI {
Future<void> initialize(String apiUrl) async {
try {
_dio = Dio(
BaseOptions(
baseUrl: apiUrl,
),
);
final bool isGMSInstalled = await checkForGMS();
if (!isGMSInstalled) {
_dio = Dio(
BaseOptions(
baseUrl: apiUrl,
),
);
log('ReVanced API: Using default engine + $isGMSInstalled');
} else {
if (Platform.isIOS || Platform.isMacOS || Platform.isAndroid) {
final CronetEngine androidCronetEngine = await CronetEngine.build(
userAgent: 'ReVanced Manager',
enableBrotli: true,
enableQuic: true,
);
_dio.httpClientAdapter =
NativeAdapter(androidCronetEngine: androidCronetEngine);
_dio = Dio(
BaseOptions(
baseUrl: apiUrl,
),
);
}
log('ReVanced API: Using CronetEngine + $isGMSInstalled');
}
_dio.interceptors.add(DioCacheInterceptor(options: _cacheOptions));
} on Exception catch (e) {
if (kDebugMode) {

View File

@@ -1,4 +1,4 @@
import 'package:flutter/material.dart' hide SearchBar;
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:revanced_manager/ui/views/app_selector/app_selector_viewmodel.dart';
import 'package:revanced_manager/ui/widgets/appSelectorView/app_skeleton_loader.dart';
@@ -78,7 +78,7 @@ class _AppSelectorViewState extends State<AppSelectorView> {
child: model.noApps
? Center(
child: I18nText(
'appSelectorView.noAppsLabel',
'appSelectorView.noApps',
child: Text(
'',
style: TextStyle(
@@ -92,10 +92,7 @@ class _AppSelectorViewState extends State<AppSelectorView> {
? const AppSkeletonLoader()
: Padding(
padding: const EdgeInsets.symmetric(horizontal: 12.0)
.copyWith(
bottom:
MediaQuery.of(context).viewPadding.bottom + 8.0,
),
.copyWith(bottom: 80),
child: Column(
children: [
...model
@@ -111,7 +108,16 @@ class _AppSelectorViewState extends State<AppSelectorView> {
model.getSuggestedVersion(
app.packageName,
),
onTap: () => model.canSelectInstalled(context, app.packageName),
onTap: () {
model.isRooted
? model.selectApp(app).then(
(_) => Navigator.of(context)
.pop(),
)
: model.showSelectFromStorageDialog(
context,
);
},
),
)
.toList(),

View File

@@ -65,14 +65,6 @@ class AppSelectorViewModel extends BaseViewModel {
return _patcherAPI.getSuggestedVersion(packageName);
}
Future<bool> checkSplitApk(String packageName) async {
final app = await DeviceApps.getApp(packageName);
if (app != null) {
return app.isSplit;
}
return true;
}
Future<void> selectApp(ApplicationWithIcon application) async {
locator<PatcherViewModel>().selectedApp = PatchedApplication(
name: application.appName,
@@ -86,22 +78,6 @@ class AppSelectorViewModel extends BaseViewModel {
locator<PatcherViewModel>().loadLastSelectedPatches();
}
Future<void> canSelectInstalled(
BuildContext context,
String packageName,
) async {
final app =
await DeviceApps.getApp(packageName, true) as ApplicationWithIcon?;
if (app != null) {
if (await checkSplitApk(packageName) && !isRooted) {
return showSelectFromStorageDialog(context);
} else if (!await checkSplitApk(packageName) || isRooted) {
selectApp(app);
Navigator.pop(context);
}
}
}
Future showSelectFromStorageDialog(BuildContext context) async {
return showDialog(
context: context,
@@ -161,6 +137,7 @@ class AppSelectorViewModel extends BaseViewModel {
isFilled: false,
onPressed: () {
Navigator.pop(context);
Navigator.pop(context);
},
label: Row(
mainAxisAlignment: MainAxisAlignment.center,

View File

@@ -57,7 +57,6 @@ class ContributorsView extends StatelessWidget {
title: 'contributorsView.managerContributors',
contributors: model.managerContributors,
),
SizedBox(height: MediaQuery.of(context).viewPadding.bottom)
],
),
),

View File

@@ -39,10 +39,13 @@ class HomeViewModel extends BaseViewModel {
bool showUpdatableApps = false;
List<PatchedApplication> patchedInstalledApps = [];
List<PatchedApplication> patchedUpdatableApps = [];
String? _latestManagerVersion = '';
String _managerVersion = '';
Future<void> initialize(BuildContext context) async {
_latestManagerVersion = await _managerAPI.getLatestManagerVersion();
_managerVersion = await AboutInfo.getInfo().then(
(value) => value.keys.contains('version') ? value['version']! : '',
);
_managerVersion = await _managerAPI.getCurrentManagerVersion();
await flutterLocalNotificationsPlugin.initialize(
const InitializationSettings(
android: AndroidInitializationSettings('ic_notification'),
@@ -112,6 +115,7 @@ class HomeViewModel extends BaseViewModel {
}
Future<bool> hasManagerUpdates() async {
final String? latestVersion = await _managerAPI.getLatestManagerVersion();
String currentVersion = await _managerAPI.getCurrentManagerVersion();
// add v to current version
@@ -119,7 +123,7 @@ class HomeViewModel extends BaseViewModel {
currentVersion = 'v$currentVersion';
}
if (_latestManagerVersion != currentVersion) {
if (latestVersion != currentVersion) {
return true;
}
return false;
@@ -190,7 +194,7 @@ class HomeViewModel extends BaseViewModel {
),
const SizedBox(width: 8.0),
Text(
'v$_latestManagerVersion',
'v$_managerVersion',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w500,

View File

@@ -20,7 +20,6 @@ class InstallerView extends StatelessWidget {
builder: (context, model, child) => WillPopScope(
child: SafeArea(
top: false,
bottom: false,
child: Scaffold(
body: CustomScrollView(
controller: model.scrollController,
@@ -154,11 +153,6 @@ class InstallerView extends StatelessWidget {
),
),
),
SliverFillRemaining(
hasScrollBody: false,
child: SizedBox(
height: MediaQuery.of(context).viewPadding.bottom),
),
],
),
),

View File

@@ -86,11 +86,13 @@ class PatcherViewModel extends BaseViewModel {
}
Future<void> showArmv7WarningDialog(BuildContext context) async {
final bool armv7 = await AboutInfo.getInfo().then((info) {
final List<String> archs = info['arch'];
final supportedAbis = ['arm64-v8a', 'x86', 'x86_64'];
return !archs.any((arch) => supportedAbis.contains(arch));
});
final bool armv7 = await AboutInfo.getInfo().then(
(info) =>
info['arch'] != null &&
info['arch']!.contains('armeabi-v7a') &&
!info['arch']!.contains('arm64-v8a'),
);
if (context.mounted && armv7) {
return showDialog(
context: context,

View File

@@ -1,4 +1,4 @@
import 'package:flutter/material.dart' hide SearchBar;
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:revanced_manager/ui/views/patches_selector/patches_selector_viewmodel.dart';
import 'package:revanced_manager/ui/widgets/patchesSelectorView/patch_item.dart';
@@ -129,10 +129,8 @@ class _PatchesSelectorViewState extends State<PatchesSelectorView> {
),
)
: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 12.0).copyWith(
bottom: MediaQuery.of(context).viewPadding.bottom + 8.0,
),
padding: const EdgeInsets.symmetric(horizontal: 12.0)
.copyWith(bottom: 80),
child: Column(
children: [
Row(

View File

@@ -33,8 +33,8 @@ class _LatestCommitCardState extends State<LatestCommitCard> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
const Row(
children: <Widget>[
Row(
children: const <Widget>[
Text('ReVanced Manager'),
],
),
@@ -82,8 +82,8 @@ class _LatestCommitCardState extends State<LatestCommitCard> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
const Row(
children: <Widget>[
Row(
children: const <Widget>[
Text('ReVanced Patches'),
],
),

View File

@@ -39,9 +39,9 @@ class SocialMediaWidget extends StatelessWidget {
),
expanded: Padding(
padding: padding ?? EdgeInsets.zero,
child: const CustomCard(
child: CustomCard(
child: Column(
children: <Widget>[
children: const <Widget>[
SocialMediaItem(
icon: FaIcon(FontAwesomeIcons.github),
title: Text('GitHub'),

View File

@@ -0,0 +1,10 @@
// Check for google mobile services on device
import 'package:device_apps/device_apps.dart';
Future<bool> checkForGMS() async {
bool isGMSInstalled = true;
isGMSInstalled = await DeviceApps.isAppInstalled('com.google.android.gms') ||
await DeviceApps.isAppInstalled('com.android.vending');
return isGMSInstalled;
}

View File

@@ -1,23 +1,16 @@
name: revanced_manager
description: The official ReVanced Manager.
homepage: https://github.com/revanced/revanced-manager
publish_to: 'none'
version: 1.3.0+100300000
publish_to: none
version: 1.0.0-dev.1+100000100
environment:
sdk: '>=3.0.0 <4.0.0'
sdk: ">=2.17.5 <3.0.0"
dependencies:
animations: ^2.0.7
app_installer: ^1.1.0
collection: ^1.17.0
cross_connectivity: ^3.0.5
cr_file_saver:
git:
url: https://github.com/dhruvanbhalara/cr_file_saver
ref: "fix/incorrect_file_name"
cr_file_saver: ^0.0.2+1
device_apps:
git:
url: https://github.com/ponces/flutter_plugin_device_apps
@@ -36,7 +29,7 @@ dependencies:
sdk: flutter
flutter_background: ^1.2.0
flutter_cache_manager: ^3.3.0
flutter_i18n: ^0.33.0
flutter_i18n: ^0.32.4
flutter_local_notifications: ^13.0.0
flutter_localizations:
sdk: flutter
@@ -47,7 +40,7 @@ dependencies:
google_fonts: ^4.0.3
http: ^0.13.5
injectable: ^2.1.1
intl: ^0.18.0
intl: ^0.17.0
json_annotation: ^4.8.0
logcat:
git:
@@ -56,6 +49,7 @@ dependencies:
package_info_plus: ^3.0.3
path_provider: ^2.0.14
permission_handler: ^10.2.0
native_dio_adapter: ^0.1.0
pull_to_refresh: ^2.0.0
root:
git:
@@ -74,8 +68,8 @@ dependencies:
wakelock: ^0.6.2
flutter_dotenv: ^5.0.2
flutter_markdown: ^0.6.14
pub_release: ^8.0.3
dio_cache_interceptor: ^3.4.0
dev_dependencies:
json_serializable: ^6.6.1
build_runner: any
@@ -83,10 +77,7 @@ dev_dependencies:
flutter_lints: ^2.0.1
flutter_test:
sdk: flutter
injectable_generator: ^2.1.5
injectable_generator: ^2.1.5
flutter:
uses-material-design: true
assets: