Compare commits

..

14 Commits

Author SHA1 Message Date
Imran
3ebbd2a4a5 Merge pull request #2033 from ImranR98/dev
Bugfix: GitHub fallback option was broken (#2032)
2024-12-12 11:05:30 -05:00
Imran Remtulla
82207a1b3b Increment version 2024-12-12 11:04:46 -05:00
Imran Remtulla
2ec5c7db11 Bugfix: GitHub fallback option was broken (#2032) 2024-12-12 11:04:31 -05:00
Imran
ab949af700 Merge pull request #2031 from ImranR98/dev
Hardcode Flutter version in GitHub action for now (until new Flutter works)
2024-12-12 04:02:41 -05:00
Imran Remtulla
5c9a35c4f0 Hardcode Flutter version in GitHub action for now (until new Flutter works) 2024-12-12 04:01:59 -05:00
Imran
8651f58744 Merge pull request #2030 from ImranR98/dev
- Avoid OS version reconciliation for pseudo-versioned apps (#2023)
- When importing configs via link, don't show dialog twice
- GitHub - do not use filtered asset release dates (#2012)
2024-12-12 03:53:27 -05:00
Imran Remtulla
d93798a8df Increment version 2024-12-12 03:52:10 -05:00
Imran Remtulla
0822f991ff Remove unused function 2024-12-12 03:34:47 -05:00
Imran Remtulla
fde63a0f05 GitHub - do not use filtered asset release dates (#2012) 2024-12-12 03:27:17 -05:00
Imran Remtulla
523e1151b2 When importing configs via link, don't show dialog twice 2024-12-12 02:58:01 -05:00
Imran Remtulla
d5d6825ed9 Avoid OS version reconciliation for pseudo-versioned apps (#2023) 2024-12-12 02:40:04 -05:00
Imran
79c4d3b9fe Merge pull request #2026 from summoner001/main
Update hu.json
2024-12-12 02:21:19 -05:00
Imran Remtulla
d6b99b903f Prevent pseudo-versioning method from changing on load (#2022) 2024-12-12 02:20:56 -05:00
summoner001
335752ee7c Update hu.json
Correcting hungarian translation
2024-12-10 15:55:12 +01:00
8 changed files with 59 additions and 45 deletions

View File

@@ -15,6 +15,9 @@ jobs:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.24.5
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options

View File

@@ -317,7 +317,7 @@
"crowdsourcedConfigsShort": "Crowdsourced App Configs",
"allowInsecure": "Nem biztonságos HTTP-kérések engedélyezése",
"stayOneVersionBehind": "Maradjon egy verzióval a legújabb mögött",
"refreshBeforeDownload": "Az alkalmazás adatainak frissítése letöltés előtt",
"refreshBeforeDownload": "Az alkalmazás adatainak frissítése a letöltés előtt",
"removeAppQuestion": {
"one": "Eltávolítja az alkalmazást?",
"other": "Eltávolítja az alkalmazásokat?"

View File

@@ -275,14 +275,15 @@ class GitHub extends AppSource {
}
}
List<MapEntry<String, String>> getReleaseAssetUrls(dynamic release) =>
findReleaseAssetUrls(dynamic release) =>
(release['assets'] as List<dynamic>?)?.map((e) {
var url = !e['name'].toString().toLowerCase().endsWith('.apk')
? (e['browser_download_url'] ?? e['url'])
: (e['url'] ?? e['browser_download_url']);
return (e['name'] != null) && (url != null)
e['final_url'] = (e['name'] != null) && (url != null)
? MapEntry(e['name'] as String, url as String)
: const MapEntry('', '');
return e;
}).toList() ??
[];
@@ -293,7 +294,9 @@ class GitHub extends AppSource {
? DateTime.parse(rel['commit']['created'])
: null;
DateTime? getNewestAssetDateFromRelease(dynamic rel) {
var t = (rel['assets'] as List<dynamic>?)
var allAssets = rel['assets'] as List<dynamic>?;
var filteredAssets = rel['filteredAssets'] as List<dynamic>?;
var t = (filteredAssets ?? allAssets)
?.map((e) {
return e?['updated_at'] != null
? DateTime.parse(e['updated_at'])
@@ -387,18 +390,37 @@ class GitHub extends AppSource {
.hasMatch(((releases[i]['body'] as String?) ?? '').trim())) {
continue;
}
var allAssetUrls = getReleaseAssetUrls(releases[i]);
List<MapEntry<String, String>> apkUrls = allAssetUrls
.where((element) => element.key.toLowerCase().endsWith('.apk'))
var allAssetsWithUrls = findReleaseAssetUrls(releases[i]);
List<MapEntry<String, String>> allAssetUrls = allAssetsWithUrls
.map((e) => e['final_url'] as MapEntry<String, String>)
.toList();
var apkAssetsWithUrls = allAssetsWithUrls
.where((element) =>
(element['final_url'] as MapEntry<String, String>)
.key
.toLowerCase()
.endsWith('.apk'))
.toList();
apkUrls = filterApks(apkUrls, additionalSettings['apkFilterRegEx'],
var filteredApkUrls = filterApks(
apkAssetsWithUrls
.map((e) => e['final_url'] as MapEntry<String, String>)
.toList(),
additionalSettings['apkFilterRegEx'],
additionalSettings['invertAPKFilter']);
if (apkUrls.isEmpty && additionalSettings['trackOnly'] != true) {
var filteredApks = apkAssetsWithUrls
.where((e) => filteredApkUrls
.where((e2) =>
e2.key == (e['final_url'] as MapEntry<String, String>).key)
.isNotEmpty)
.toList();
if (filteredApks.isEmpty && additionalSettings['trackOnly'] != true) {
continue;
}
targetRelease = releases[i];
targetRelease['apkUrls'] = apkUrls;
targetRelease['apkUrls'] = filteredApkUrls;
targetRelease['filteredAssets'] = filteredApks;
targetRelease['version'] =
additionalSettings['releaseTitleAsVersion'] == true
? nameToFilter
@@ -420,6 +442,7 @@ class GitHub extends AppSource {
throw NoReleasesError();
}
String? version = targetRelease['version'];
DateTime? releaseDate = getReleaseDateFromRelease(
targetRelease, useLatestAssetDateAsReleaseDate);
if (version == null) {

View File

@@ -838,30 +838,6 @@ class AppsPageState extends State<AppsPage> {
Navigator.of(context).pop();
}
resetSelectedAppsInstallStatuses() async {
try {
var values = await showDialog(
context: context,
builder: (BuildContext ctx) {
return GeneratedFormModal(
title: tr('resetInstallStatusForSelectedAppsQuestion'),
items: const [],
initValid: true,
message: tr('installStatusOfXWillBeResetExplanation',
args: [plural('apps', selectedAppIds.length)]),
);
});
if (values != null) {
appsProvider.saveApps(selectedApps.map((e) {
e.installedVersion = null;
return e;
}).toList());
}
} finally {
Navigator.of(context).pop();
}
}
showMoreOptionsDialog() {
return showDialog(
context: context,

View File

@@ -130,13 +130,18 @@ class _HomePageState extends State<HomePage> {
// Check initial link if app was in cold state (terminated)
final appLink = await _appLinks.getInitialLink();
var initLinked = false;
if (appLink != null) {
await interpretLink(appLink);
initLinked = true;
}
// Handle link when app is in warm state (front or background)
_linkSubscription = _appLinks.uriLinkStream.listen((uri) async {
await interpretLink(uri);
if (!initLinked) {
await interpretLink(uri);
} else {
initLinked = false;
}
});
}

View File

@@ -19,6 +19,8 @@ import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:http/io_client.dart';
import 'package:obtainium/app_sources/directAPKLink.dart';
import 'package:obtainium/app_sources/html.dart';
import 'package:obtainium/components/generated_form.dart';
import 'package:obtainium/components/generated_form_modal.dart';
import 'package:obtainium/custom_errors.dart';
@@ -1159,17 +1161,25 @@ class AppsProvider with ChangeNotifier {
if (app?.app == null) {
return false;
}
var source = SourceProvider()
.getSource(app!.app.url, overrideSource: app.app.overrideSource);
var naiveStandardVersionDetection =
app!.app.additionalSettings['naiveStandardVersionDetection'] == true ||
SourceProvider()
.getSource(app.app.url, overrideSource: app.app.overrideSource)
.naiveStandardVersionDetection;
app.app.additionalSettings['naiveStandardVersionDetection'] == true ||
source.naiveStandardVersionDetection;
String? realInstalledVersion =
app.app.additionalSettings['useVersionCodeAsOSVersion'] == true
? app.installedInfo?.versionCode.toString()
: app.installedInfo?.versionName;
bool isHTMLWithNoVersionDetection =
(source.runtimeType == HTML().runtimeType &&
(app.app.additionalSettings['versionExtractionRegEx'] as String?)
?.isNotEmpty !=
true);
bool isDirectAPKLink = source.runtimeType == DirectAPKLink().runtimeType;
return app.app.additionalSettings['trackOnly'] != true &&
app.app.additionalSettings['releaseDateAsVersion'] != true &&
!isHTMLWithNoVersionDetection &&
!isDirectAPKLink &&
realInstalledVersion != null &&
app.app.installedVersion != null &&
(reconcileVersionDifferences(
@@ -1240,6 +1250,7 @@ class AppsProvider with ChangeNotifier {
!isVersionDetectionPossible(
AppInMemory(app, null, installedInfo, null))) {
app.additionalSettings['versionDetection'] = false;
app.installedVersion = app.latestVersion;
logs.add('Could not reconcile version formats for: ${app.id}');
modded = true;
}

View File

@@ -151,10 +151,6 @@ appJSONCompatibilityModifiers(Map<String, dynamic> json) {
additionalSettings['autoApkFilterByArch'] = false;
}
if (source.runtimeType == HTML().runtimeType) {
// HTML 'fixed URL' support should be disabled if it previously did not exist
if (originalAdditionalSettings['supportFixedAPKURL'] == null) {
additionalSettings['supportFixedAPKURL'] = false;
}
// HTML key rename
if (originalAdditionalSettings['sortByFileNamesNotLinks'] != null) {
additionalSettings['sortByLastLinkSegment'] =

View File

@@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.1.34+2291
version: 1.1.36+2293
environment:
sdk: '>=3.0.0 <4.0.0'