Skip to content

Commit

Permalink
Merge pull request #1257 from ImranR98/dev
Browse files Browse the repository at this point in the history
Add F-Droid changelogs (#1255), Fix corrupt pt.json (#1256)
  • Loading branch information
ImranR98 authored Jan 8, 2024
2 parents 8e71378 + daffff7 commit e8580dc
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
1 change: 0 additions & 1 deletion assets/translations/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
17 changes: 15 additions & 2 deletions lib/app_sources/fdroid.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit e8580dc

Please sign in to comment.