From 70e54ce14a26a030fbcfa156c2f1919fccb48ff1 Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Wed, 10 Jan 2024 18:51:22 -0500 Subject: [PATCH] F-Droid small fix --- lib/app_sources/fdroid.dart | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/app_sources/fdroid.dart b/lib/app_sources/fdroid.dart index f3a38bd..6ddaebe 100644 --- a/lib/app_sources/fdroid.dart +++ b/lib/app_sources/fdroid.dart @@ -86,13 +86,11 @@ class FDroid extends AppSource { var res = await sourceRequest( 'https://gitlab.com/fdroid/fdroiddata/-/raw/master/metadata/$appId.yml'); var lines = res.body.split('\n'); - String author = lines - .where((l) => l.startsWith('AuthorName: ')) - .first - .split(': ') - .sublist(1) - .join(': '); - details.names.author = author; + var authorLines = lines.where((l) => l.startsWith('AuthorName: ')); + if (authorLines.isNotEmpty) { + details.names.author = + authorLines.first.split(': ').sublist(1).join(': '); + } var changelogUrls = lines.where((l) => l.startsWith('Changelog: ')); if (changelogUrls.isNotEmpty) { details.changeLog = changelogUrls.first;