mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2025-05-19 15:37:43 +08:00
Compare commits
3 Commits
v1.22.1-de
...
v1.22.1-de
Author | SHA1 | Date | |
---|---|---|---|
a68a83940d | |||
1f95767aeb | |||
c7298424e5 |
@ -219,6 +219,9 @@ class MainActivity : FlutterActivity() {
|
||||
keystorePassword: String
|
||||
) {
|
||||
val inFile = File(inFilePath)
|
||||
// Necessary because the file is copied from a nonwriteable location.
|
||||
inFile.setWritable(true)
|
||||
inFile.setReadable(true)
|
||||
val outFile = File(outFilePath)
|
||||
val integrations = File(integrationsPath)
|
||||
val keyStoreFile = File(keyStoreFilePath)
|
||||
|
@ -69,7 +69,8 @@ class ManagerAPI {
|
||||
}
|
||||
|
||||
// Migrate to new API URL if not done yet as the old one is sunset.
|
||||
final bool hasMigratedToNewApi = _prefs.getBool('migratedToNewApiUrl') ?? false;
|
||||
final bool hasMigratedToNewApi =
|
||||
_prefs.getBool('migratedToNewApiUrl') ?? false;
|
||||
if (!hasMigratedToNewApi) {
|
||||
final String apiUrl = getApiUrl().toLowerCase();
|
||||
if (apiUrl.contains('releases.revanced.app')) {
|
||||
@ -78,11 +79,14 @@ class ManagerAPI {
|
||||
}
|
||||
}
|
||||
|
||||
final bool hasMigratedToAlternativeSource = _prefs.getBool('migratedToAlternativeSource') ?? false;
|
||||
final bool hasMigratedToAlternativeSource =
|
||||
_prefs.getBool('migratedToAlternativeSource') ?? false;
|
||||
if (!hasMigratedToAlternativeSource) {
|
||||
final String patchesRepo = getPatchesRepo();
|
||||
final String integrationsRepo = getIntegrationsRepo();
|
||||
final bool usingAlternativeSources = patchesRepo.toLowerCase() != defaultPatchesRepo || integrationsRepo.toLowerCase() != defaultIntegrationsRepo;
|
||||
final bool usingAlternativeSources =
|
||||
patchesRepo.toLowerCase() != defaultPatchesRepo ||
|
||||
integrationsRepo.toLowerCase() != defaultIntegrationsRepo;
|
||||
_prefs.setBool('useAlternativeSources', usingAlternativeSources);
|
||||
_prefs.setBool('migratedToAlternativeSource', true);
|
||||
}
|
||||
@ -119,6 +123,9 @@ class ManagerAPI {
|
||||
}
|
||||
|
||||
String getPatchesRepo() {
|
||||
if (!isUsingAlternativeSources()) {
|
||||
return defaultPatchesRepo;
|
||||
}
|
||||
return _prefs.getString('patchesRepo') ?? defaultPatchesRepo;
|
||||
}
|
||||
|
||||
@ -452,7 +459,7 @@ class ManagerAPI {
|
||||
|
||||
Future<File?> downloadPatches() async {
|
||||
try {
|
||||
final String repoName = !isUsingAlternativeSources() ? defaultPatchesRepo : getPatchesRepo();
|
||||
final String repoName = getPatchesRepo();
|
||||
final String currentVersion = await getCurrentPatchesVersion();
|
||||
final String url = getPatchesDownloadURL();
|
||||
return await _githubAPI.getReleaseFile(
|
||||
@ -471,7 +478,9 @@ class ManagerAPI {
|
||||
|
||||
Future<File?> downloadIntegrations() async {
|
||||
try {
|
||||
final String repoName = !isUsingAlternativeSources() ? defaultIntegrationsRepo : getIntegrationsRepo();
|
||||
final String repoName = !isUsingAlternativeSources()
|
||||
? defaultIntegrationsRepo
|
||||
: getIntegrationsRepo();
|
||||
final String currentVersion = await getCurrentIntegrationsVersion();
|
||||
final String url = getIntegrationsDownloadURL();
|
||||
return await _githubAPI.getReleaseFile(
|
||||
|
@ -484,7 +484,7 @@ class HomeViewModel extends BaseViewModel {
|
||||
|
||||
Future<String?> getLatestPatchesChangelog() async {
|
||||
final release =
|
||||
await _githubAPI.getLatestRelease(_managerAPI.defaultPatchesRepo);
|
||||
await _githubAPI.getLatestRelease(_managerAPI.getPatchesRepo());
|
||||
return release?['body'];
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ homepage: https://github.com/ReVanced/revanced-manager
|
||||
|
||||
publish_to: 'none'
|
||||
|
||||
version: 1.22.1-dev.1+101800039
|
||||
version: 1.22.1-dev.2+101800040
|
||||
|
||||
environment:
|
||||
sdk: '>=3.0.0 <4.0.0'
|
||||
|
Reference in New Issue
Block a user