Compare commits

...

6 Commits

Author SHA1 Message Date
Imran Remtulla
e8cbac8657 Merge pull request #413 from gidano/Obtainium-HU
Done
2023-04-04 21:13:23 -04:00
Imran Remtulla
b66c13d319 Merge pull request #424 from ImranR98/dev
Bugfix #392, Custom App Names #420, Archive Label in GitHub Search #421
2023-04-04 21:05:54 -04:00
Imran Remtulla
782d055bc3 Added cloudflare.f-droid.org support 2023-04-04 20:21:24 -04:00
Imran Remtulla
d557746965 Increment version 2023-04-04 20:00:36 -04:00
Imran Remtulla
e6b05d50b9 Scrolling bugfix #392, custom name #420, search archive label #421 2023-04-04 19:59:35 -04:00
gidano
9fe8a200ef Done 2023-04-01 14:55:56 +02:00
9 changed files with 36 additions and 27 deletions

View File

@@ -219,7 +219,7 @@
"importFromURLsInFile": "Importálás fájlban található URL-ből (mint pl. OPML)",
"versionDetection": "Verzió érzékelés",
"standardVersionDetection": "Alapért. verzió érzékelés",
"groupByCategory": "Group by Category",
"groupByCategory": "Csoportosítás Kategória alapján",
"removeAppQuestion": {
"one": "Eltávolítja az alkalmazást?",
"other": "Eltávolítja az alkalmazást?"

View File

@@ -14,12 +14,14 @@ class FDroid extends AppSource {
@override
String standardizeURL(String url) {
RegExp standardUrlRegExB =
RegExp('^https?://$host/+[^/]+/+packages/+[^/]+');
RegExp('^https?://(cloudflare\\.)?$host/+[^/]+/+packages/+[^/]+');
RegExpMatch? match = standardUrlRegExB.firstMatch(url.toLowerCase());
if (match != null) {
url = 'https://$host/packages/${Uri.parse(url).pathSegments.last}';
url =
'https://${Uri.parse(url.substring(0, match.end)).host}/packages/${Uri.parse(url).pathSegments.last}';
}
RegExp standardUrlRegExA = RegExp('^https?://$host/+packages/+[^/]+');
RegExp standardUrlRegExA =
RegExp('^https?://(cloudflare\\.)?$host/+packages/+[^/]+');
match = standardUrlRegExA.firstMatch(url.toLowerCase());
if (match == null) {
throw InvalidURLError(name);
@@ -61,9 +63,10 @@ class FDroid extends AppSource {
Map<String, dynamic> additionalSettings,
) async {
String? appId = tryInferringAppId(standardUrl);
String host = Uri.parse(standardUrl).host;
return getAPKUrlsFromFDroidPackagesAPIResponse(
await get(Uri.parse('https://f-droid.org/api/v1/packages/$appId')),
'https://f-droid.org/repo/$appId',
await get(Uri.parse('https://$host/api/v1/packages/$appId')),
'https://$host/repo/$appId',
standardUrl);
}
}

View File

@@ -185,9 +185,11 @@ class GitHub extends AppSource {
Map<String, String> urlsWithDescriptions = {};
for (var e in (jsonDecode(res.body)['items'] as List<dynamic>)) {
urlsWithDescriptions.addAll({
e['html_url'] as String: e['description'] != null
? e['description'] as String
: tr('noDescription')
e['html_url'] as String:
((e['archived'] == true ? '[ARCHIVED] ' : '') +
(e['description'] != null
? e['description'] as String
: tr('noDescription')))
});
}
return urlsWithDescriptions;

View File

@@ -21,7 +21,7 @@ import 'package:easy_localization/src/easy_localization_controller.dart';
// ignore: implementation_imports
import 'package:easy_localization/src/localization.dart';
const String currentVersion = '0.11.22';
const String currentVersion = '0.11.23';
const String currentReleaseTag =
'v$currentVersion-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES

View File

@@ -334,11 +334,10 @@ class _AddAppPageState extends State<AddAppPage> {
],
);
Widget getSourcesListWidget() => Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Widget getSourcesListWidget() => Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
const SizedBox(
height: 48,
),
@@ -365,16 +364,17 @@ class _AddAppPageState extends State<AddAppPage> {
fontStyle: FontStyle.italic),
)))
.toList()
]));
]);
return Scaffold(
backgroundColor: Theme.of(context).colorScheme.surface,
body: CustomScrollView(slivers: <Widget>[
body: CustomScrollView(shrinkWrap: true, slivers: <Widget>[
CustomAppBar(title: tr('addApp')),
SliverFillRemaining(
SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.all(16),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
getUrlInputRow(),

View File

@@ -147,7 +147,7 @@ class _AppPageState extends State<AppPage> {
height: 25,
),
Text(
app?.installedInfo?.name ?? app?.app.name ?? tr('app'),
app?.app.name ?? tr('app'),
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.displayLarge,
),

View File

@@ -670,6 +670,9 @@ class AppsProvider with ChangeNotifier {
for (var app in apps) {
AppInfo? info = await getInstalledInfo(app.id);
app.name = info?.name ?? app.name;
if (app.additionalSettings['appName']?.toString().isNotEmpty == true) {
app.name = app.additionalSettings['appName'].toString().trim();
}
if (attemptToCorrectInstallStatus) {
app = getCorrectedInstallStatusAppIfPossible(app, info) ?? app;
}

View File

@@ -278,7 +278,8 @@ class AppSource {
return regExValidator(value);
}
])
]
],
[GeneratedFormTextField('appName', label: tr('appName'), required: false)]
];
// Previous 2 variables combined into one at runtime for convenient usage
@@ -362,7 +363,7 @@ class SourceProvider {
url = preStandardizeUrl(url);
AppSource? source;
for (var s in sources.where((element) => element.host != null)) {
if (url.contains('://${s.host}')) {
if (RegExp('://(.+\\.)?${s.host}').hasMatch(url)) {
source = s;
break;
}
@@ -427,8 +428,10 @@ class SourceProvider {
throw NoAPKError();
}
String apkVersion = apk.version.replaceAll('/', '-');
var name = currentApp?.name.trim() ??
apk.names.name[0].toUpperCase() + apk.names.name.substring(1);
var name = currentApp != null ? currentApp.name.trim() : '';
name = name.isNotEmpty
? name
: apk.names.name[0].toUpperCase() + apk.names.name.substring(1);
return App(
currentApp?.id ??
source.tryInferringAppId(standardUrl,
@@ -436,9 +439,7 @@ class SourceProvider {
generateTempID(standardUrl, additionalSettings),
standardUrl,
apk.names.author[0].toUpperCase() + apk.names.author.substring(1),
name.trim().isNotEmpty
? name
: apk.names.name[0].toUpperCase() + apk.names.name.substring(1),
name,
currentApp?.installedVersion,
apkVersion,
apk.apkUrls,

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: 0.11.22+144 # When changing this, update the tag in main() accordingly
version: 0.11.23+145 # When changing this, update the tag in main() accordingly
environment:
sdk: '>=2.18.2 <3.0.0'