mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2025-08-06 18:24:25 +08:00
Compare commits
5 Commits
v1.22.0
...
v1.22.1-de
Author | SHA1 | Date | |
---|---|---|---|
a68a83940d | |||
1f95767aeb | |||
c7298424e5 | |||
d53f8cf130 | |||
a7e2281805 |
@ -219,6 +219,9 @@ class MainActivity : FlutterActivity() {
|
|||||||
keystorePassword: String
|
keystorePassword: String
|
||||||
) {
|
) {
|
||||||
val inFile = File(inFilePath)
|
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 outFile = File(outFilePath)
|
||||||
val integrations = File(integrationsPath)
|
val integrations = File(integrationsPath)
|
||||||
val keyStoreFile = File(keyStoreFilePath)
|
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.
|
// 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) {
|
if (!hasMigratedToNewApi) {
|
||||||
final String apiUrl = getApiUrl().toLowerCase();
|
final String apiUrl = getApiUrl().toLowerCase();
|
||||||
if (apiUrl.contains('releases.revanced.app')) {
|
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) {
|
if (!hasMigratedToAlternativeSource) {
|
||||||
final String patchesRepo = getPatchesRepo();
|
final String patchesRepo = getPatchesRepo();
|
||||||
final String integrationsRepo = getIntegrationsRepo();
|
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('useAlternativeSources', usingAlternativeSources);
|
||||||
_prefs.setBool('migratedToAlternativeSource', true);
|
_prefs.setBool('migratedToAlternativeSource', true);
|
||||||
}
|
}
|
||||||
@ -119,6 +123,9 @@ class ManagerAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String getPatchesRepo() {
|
String getPatchesRepo() {
|
||||||
|
if (!isUsingAlternativeSources()) {
|
||||||
|
return defaultPatchesRepo;
|
||||||
|
}
|
||||||
return _prefs.getString('patchesRepo') ?? defaultPatchesRepo;
|
return _prefs.getString('patchesRepo') ?? defaultPatchesRepo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -452,7 +459,7 @@ class ManagerAPI {
|
|||||||
|
|
||||||
Future<File?> downloadPatches() async {
|
Future<File?> downloadPatches() async {
|
||||||
try {
|
try {
|
||||||
final String repoName = !isUsingAlternativeSources() ? defaultPatchesRepo : getPatchesRepo();
|
final String repoName = getPatchesRepo();
|
||||||
final String currentVersion = await getCurrentPatchesVersion();
|
final String currentVersion = await getCurrentPatchesVersion();
|
||||||
final String url = getPatchesDownloadURL();
|
final String url = getPatchesDownloadURL();
|
||||||
return await _githubAPI.getReleaseFile(
|
return await _githubAPI.getReleaseFile(
|
||||||
@ -471,7 +478,9 @@ class ManagerAPI {
|
|||||||
|
|
||||||
Future<File?> downloadIntegrations() async {
|
Future<File?> downloadIntegrations() async {
|
||||||
try {
|
try {
|
||||||
final String repoName = !isUsingAlternativeSources() ? defaultIntegrationsRepo : getIntegrationsRepo();
|
final String repoName = !isUsingAlternativeSources()
|
||||||
|
? defaultIntegrationsRepo
|
||||||
|
: getIntegrationsRepo();
|
||||||
final String currentVersion = await getCurrentIntegrationsVersion();
|
final String currentVersion = await getCurrentIntegrationsVersion();
|
||||||
final String url = getIntegrationsDownloadURL();
|
final String url = getIntegrationsDownloadURL();
|
||||||
return await _githubAPI.getReleaseFile(
|
return await _githubAPI.getReleaseFile(
|
||||||
|
@ -84,8 +84,8 @@ class HomeViewModel extends BaseViewModel {
|
|||||||
.resolvePlatformSpecificImplementation<
|
.resolvePlatformSpecificImplementation<
|
||||||
AndroidFlutterLocalNotificationsPlugin>()
|
AndroidFlutterLocalNotificationsPlugin>()
|
||||||
?.requestNotificationsPermission();
|
?.requestNotificationsPermission();
|
||||||
final bool isConnected =
|
final bool isConnected = !(await Connectivity().checkConnectivity())
|
||||||
await Connectivity().checkConnectivity() != [ConnectivityResult.none];
|
.contains(ConnectivityResult.none);
|
||||||
if (!isConnected) {
|
if (!isConnected) {
|
||||||
_toast.showBottom(t.homeView.noConnection);
|
_toast.showBottom(t.homeView.noConnection);
|
||||||
}
|
}
|
||||||
@ -484,7 +484,7 @@ class HomeViewModel extends BaseViewModel {
|
|||||||
|
|
||||||
Future<String?> getLatestPatchesChangelog() async {
|
Future<String?> getLatestPatchesChangelog() async {
|
||||||
final release =
|
final release =
|
||||||
await _githubAPI.getLatestRelease(_managerAPI.defaultPatchesRepo);
|
await _githubAPI.getLatestRelease(_managerAPI.getPatchesRepo());
|
||||||
return release?['body'];
|
return release?['body'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ homepage: https://github.com/ReVanced/revanced-manager
|
|||||||
|
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
|
|
||||||
version: 1.22.0+101800038
|
version: 1.22.1-dev.2+101800040
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.0.0 <4.0.0'
|
sdk: '>=3.0.0 <4.0.0'
|
||||||
|
Reference in New Issue
Block a user