diff --git a/.github/workflows/temp.yml b/.github/workflows/temp.yml new file mode 100644 index 000000000..a51c898e3 --- /dev/null +++ b/.github/workflows/temp.yml @@ -0,0 +1,74 @@ +name: Playing around (temp) + +permissions: + contents: write + +on: + workflow_dispatch: + inputs: + beta: + type: boolean + description: Is beta? + +jobs: + build: + runs-on: ubuntu-latest + + steps: + + - uses: actions/checkout@v3 + - uses: subosito/flutter-action@v2 + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' # See 'Supported distributions' for available options + java-version: '17' + + - name: Flutter Doctor + id: flutter_doctor + run: | + flutter doctor -v + + - name: Check submodule + id: check_submodule + run: | + git checkout ${{ inputs.checkout }} + + - name: Extract Version + id: extract_version + run: | + VERSION=$(grep -oP "^version: [^\+]+" pubspec.yaml | tail -c +10) + echo "version=$VERSION" >> $GITHUB_OUTPUT + if [ ${{ inputs.beta }} == true ]; then BETA=true; else BETA=false; fi + echo "beta=$BETA" >> $GITHUB_OUTPUT + TAG="v$VERSION" + echo "tag=$TAG" >> $GITHUB_OUTPUT + + - name: Build APKs + run: | + sed -i 's/signingConfig signingConfigs.release//g' android/app/build.gradle + flutter build apk --flavor normal && flutter build apk --split-per-abi --flavor normal + for file in build/app/outputs/flutter-apk/app-*normal*.apk*; do mv "$file" "${file//-normal/}"; done + flutter build apk --flavor fdroid -t lib/main_fdroid.dart && flutter build apk --split-per-abi --flavor fdroid -t lib/main_fdroid.dart + rm ./build/app/outputs/flutter-apk/*.sha1 + ls -l ./build/app/outputs/flutter-apk/ + + - name: Save Unsigned APKs as Action Artifacts + uses: actions/upload-artifact@v4 + with: + path: build/app/outputs/flutter-apk/* + + #- name: Create Tag + # uses: mathieudutour/github-tag-action@v6.1 + # with: + # github_token: ${{ secrets.GH_ACCESS_TOKEN }} + # custom_tag: "${{ steps.extract_version.outputs.tag }}" + # tag_prefix: "" + + #- name: Create Draft Release + # uses: ncipollo/release-action@v1 + # with: + # token: ${{ secrets.GH_ACCESS_TOKEN }} + # tag: "${{ steps.extract_version.outputs.tag }}" + # prerelease: "${{ steps.extract_version.outputs.beta }}" + # draft: "true" + # generateReleaseNotes: true diff --git a/lib/app_sources/sourcehut.dart b/lib/app_sources/sourcehut.dart index 5f8437a1d..985eebcdd 100644 --- a/lib/app_sources/sourcehut.dart +++ b/lib/app_sources/sourcehut.dart @@ -86,14 +86,15 @@ class SourceHut extends AppSource { String? releaseDateString = entry.querySelector('pubDate')?.innerHtml; DateTime? releaseDate; try { - releaseDate = releaseDateString != null - ? DateFormat('E, dd MMM yyyy HH:mm:ss Z').parse(releaseDateString) - : null; - releaseDate = releaseDateString != null - ? DateFormat( - 'EEE, dd MMM yyyy HH:mm:ss Z', - ).parse(releaseDateString) - : null; + if (releaseDateString != null) { + try { + releaseDate = DateFormat('E, dd MMM yyyy HH:mm:ss Z') + .parse(releaseDateString); + } catch (_) { + releaseDate = DateFormat('EEE, dd MMM yyyy HH:mm:ss Z') + .parse(releaseDateString); + } + } } catch (e) { // ignore } diff --git a/lib/providers/apps_provider.dart b/lib/providers/apps_provider.dart index 07193c75b..e43cdddfd 100644 --- a/lib/providers/apps_provider.dart +++ b/lib/providers/apps_provider.dart @@ -1721,10 +1721,8 @@ class AppsProvider with ChangeNotifier { } // Delete externally uninstalled Apps if needed if (removedAppIds.isNotEmpty) { - if (removedAppIds.isNotEmpty) { - if (settingsProvider.removeOnExternalUninstall) { - await removeApps(removedAppIds); - } + if (settingsProvider.removeOnExternalUninstall) { + await removeApps(removedAppIds); } } loadingApps = false;