diff --git a/assets/translations/pt.json b/assets/translations/pt.json index 819c9b9..809a850 100644 --- a/assets/translations/pt.json +++ b/assets/translations/pt.json @@ -220,7 +220,6 @@ "dontShowTrackOnlyWarnings": "Não mostrar avisos 'Apenas Monitorar'", "dontShowAPKOriginWarnings": "Não mostrar avisos de origem da APK", "moveNonInstalledAppsToBottom": "Mover aplicativos não instalados para o fundo da lista de aplicativos", - AQUI "gitlabPATLabel": "Token de Acceso Pessoal do Gitlab\n(Ativa Pesquisa e Melhor Descoberta de APKs)", "about": "Sobre", "requiresCredentialsInSettings": "{}: Isso requer credenciais adicionais (em Configurações)", diff --git a/lib/app_sources/fdroid.dart b/lib/app_sources/fdroid.dart index fdb7ddc..a9e1707 100644 --- a/lib/app_sources/fdroid.dart +++ b/lib/app_sources/fdroid.dart @@ -85,17 +85,30 @@ class FDroid extends AppSource { try { var res = await sourceRequest( 'https://gitlab.com/fdroid/fdroiddata/-/raw/master/metadata/$appId.yml'); - String author = res.body - .split('\n') + var lines = res.body.split('\n'); + String author = lines .where((l) => l.startsWith('AuthorName: ')) .first .split(': ') .sublist(1) .join(': '); details.names.author = author; + var changelogUrls = lines.where((l) => l.startsWith('Changelog: ')); + if (changelogUrls.isNotEmpty) { + details.changeLog = changelogUrls.first; + details.changeLog = (await sourceRequest(details.changeLog! + .split(': ') + .sublist(1) + .join(': ') + .replaceFirst('/blob/', '/raw/'))) + .body; + } } catch (e) { // Fail silently } + if ((details.changeLog?.length ?? 0) > 1000) { + details.changeLog = '${details.changeLog!.substring(0, 2048)}...'; + } } return details; } diff --git a/lib/main.dart b/lib/main.dart index 3838981..1e4b1db 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -19,7 +19,7 @@ import 'package:easy_localization/src/easy_localization_controller.dart'; // ignore: implementation_imports import 'package:easy_localization/src/localization.dart'; -const String currentVersion = '0.15.6'; +const String currentVersion = '0.15.7'; const String currentReleaseTag = 'v$currentVersion-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES diff --git a/pubspec.yaml b/pubspec.yaml index dcf20cb..5936dee 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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.15.6+242 # When changing this, update the tag in main() accordingly +version: 0.15.7+243 # When changing this, update the tag in main() accordingly environment: sdk: '>=3.0.0 <4.0.0'