Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor fixes #5

Merged
merged 4 commits into from
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ jobs:
run: |
version=$(grep '^version: ' pubspec.yaml | cut -d ' ' -f 2 | tr -d '\r')
echo "VERSION=$version" >> $GITHUB_OUTPUT
if [[ "$version" == *pre* ]]; then
echo "PRERELEASE=true" >> $GITHUB_OUTPUT
else
echo "PRERELEASE=false" >> $GITHUB_OUTPUT
fi


#Check if Tag Exists
- name: Check if Version Exists
Expand Down Expand Up @@ -105,9 +111,19 @@ jobs:

#Create Release
- name: Create Release
if: steps.check_version.outputs.VERSION_EXISTS == 'false'
if: steps.check_version.outputs.VERSION_EXISTS == 'false' && steps.extract_version.outputs.PRERELEASE == 'false'
uses: ncipollo/release-action@v1
with:
artifacts: build/app/outputs/flutter-apk/${{ steps.extract_name.outputs.NAME }}-${{ steps.extract_version.outputs.VERSION }}.apk
tag: v${{ steps.extract_version.outputs.VERSION }}
generateReleaseNotes: true

#Create Pre-Release
- name: Create Pre-Release
if: steps.check_version.outputs.VERSION_EXISTS == 'false' && steps.extract_version.outputs.PRERELEASE == 'true'
uses: ncipollo/release-action@v1
with:
artifacts: build/app/outputs/flutter-apk/${{ steps.extract_name.outputs.NAME }}-${{ steps.extract_version.outputs.VERSION }}.apk
tag: v${{ steps.extract_version.outputs.VERSION }}
generateReleaseNotes: true
prerelease: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Copy the repository URL `https://github.com/mihalycsaba/snag` into the Obtainium

The app should always be built with the latest stable version of Flutter.

Latest release was built with: `3.29.0`
Latest release was built with: `3.29.2`

## Contributing

Expand Down
29 changes: 29 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# TODO

- opening app removes notifications and pauses background task

- watch a giveaway

- Html table improvemnt

- android 10 light mode system buttons

- pass first page into comments

- dislay category in discussion

- edit discussion

- group user list

- ga bookmark not started

- fix comments with too much indent

- notification frequency textfield rework

- sync discussion bookmarks to the site's

- independent font size settings

- only check for notifications between interval
3 changes: 3 additions & 0 deletions lib/views/comments/comment_editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import 'package:flutter/material.dart';

import 'package:html/dom.dart' as dom;

import 'package:snag/common/card_theme.dart';
import 'package:snag/common/custom_text_field.dart';
import 'package:snag/common/functions/res_map.dart';
import 'package:snag/common/functions/res_map_ajax.dart';
Expand Down Expand Up @@ -73,6 +74,8 @@ class _CommentEditorState extends State<CommentEditor> {
children: [
widget.data.text.trim() != ''
? Card(
elevation: CustomCardTheme.elevation,
surfaceTintColor: CustomCardTheme.surfaceTintColor,
child: CustomHtml(
data: widget.data,
),
Expand Down
1 change: 0 additions & 1 deletion lib/views/discussions/discussion.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ class _DiscussionDetailsState extends State<_DiscussionDetails> {
super.initState();
_bookmark = objectbox.getDiscussionBookmarked(widget.href);
_bookmarked = _bookmark.isNotEmpty;

try {
dom.Document document = parse(widget.data);
_comment = document.getElementsByClassName('comments')[0];
Expand Down
12 changes: 7 additions & 5 deletions lib/views/giveaways/error/error_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ class ErrorPage extends StatelessWidget {
{super.key,
required this.error,
required this.url,
required this.stackTrace,
this.stackTrace,
required this.type});
final String error;
final String url;
final String stackTrace;
final String? stackTrace;
final String type;

@override
Expand All @@ -58,15 +58,17 @@ class ErrorPage extends StatelessWidget {
),
Center(
child: Text(
'Most likely the URL is invalid.',
stackTrace == null
? error
: 'Most likely the URL is invalid.',
style: TextStyle(color: Colors.blue, fontSize: 18),
)),
Column(
children: [
Text('URL: $url',
style: TextStyle(fontWeight: FontWeight.bold)),
Text(error),
Text(stackTrace)
stackTrace != null ? Text(error) : Container(),
stackTrace != null ? Text(stackTrace!) : Container(),
],
)
],
Expand Down
8 changes: 1 addition & 7 deletions lib/views/giveaways/giveaway/giveaway.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,22 +99,16 @@ class _GiveawayState extends State<Giveaway> {
error:
'You are not a member of the required Steam groups.',
url: _url,
stackTrace: '',
type: 'giveaway');
} else if (error.contains(
"not a member of the giveaway creator's whitelist.")) {
return ErrorPage(
error:
"You are not a member of the giveaway creator's whitelist.",
url: _url,
stackTrace: '',
type: 'giveaway');
} else if (error.contains('Deleted ')) {
return ErrorPage(
error: error,
url: _url,
stackTrace: '',
type: 'giveaway');
return ErrorPage(error: error, url: _url, type: 'giveaway');
}
return RefreshIndicator(
onRefresh: pullRefresh,
Expand Down
42 changes: 21 additions & 21 deletions lib/views/misc/oss_licenses.dart
Original file line number Diff line number Diff line change
Expand Up @@ -369,14 +369,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.''',
PackageRef('yaml')
]);

/// args 2.6.0
/// args 2.7.0
const _args = Package(
name: 'args',
description:
'Library for defining parsers for parsing raw command-line arguments into a set of options and values using GNU and POSIX style options.',
repository: 'https://github.com/dart-lang/core/main/pkgs/args',
repository: 'https://github.com/dart-lang/core/tree/main/pkgs/args',
authors: [],
version: '2.6.0',
version: '2.7.0',
license: '''Copyright 2013, the Dart project authors.

Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -1512,14 +1512,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.''',
isSdk: false,
dependencies: [PackageRef('typed_data')]);

/// csslib 0.17.3
/// csslib 1.0.2
const _csslib = Package(
name: 'csslib',
description:
'A library for parsing and analyzing CSS (Cascading Style Sheets).',
repository: 'https://github.com/dart-lang/csslib',
repository: 'https://github.com/dart-lang/tools/tree/main/pkgs/csslib',
authors: [],
version: '0.17.3',
version: '1.0.2',
license: '''Copyright 2013, the Dart project authors.

Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -3033,13 +3033,13 @@ const _flat_buffers = Package(
isSdk: false,
dependencies: []);

/// flutter 3.29.0
/// flutter 3.29.2
const _flutter = Package(
name: 'flutter',
description: 'A framework for writing Flutter applications',
homepage: 'https://flutter.dev',
authors: [],
version: '3.29.0',
version: '3.29.2',
license: '''Copyright 2014 The Flutter Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down Expand Up @@ -3120,17 +3120,17 @@ SOFTWARE.''',
PackageRef('uuid')
]);

/// flutter_html 3.0.0-beta.2
/// flutter_html 3.0.0
const _flutter_html = Package(
name: 'flutter_html',
description:
'A Flutter widget for rendering static HTML and CSS as Flutter widgets.',
homepage: 'https://github.com/Sub6Resources/flutter_html',
authors: [],
version: '3.0.0-beta.2',
version: '3.0.0',
license: '''MIT License

Copyright (c) 2019-2022 The flutter_html developers
Copyright (c) 2019-2025 The flutter_html developers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -3159,17 +3159,17 @@ SOFTWARE.''',
PackageRef('flutter')
]);

/// flutter_html_table 3.0.0-beta.2
/// flutter_html_table 3.0.0
const _flutter_html_table = Package(
name: 'flutter_html_table',
description:
'This extension package allows the <table> tag to be rendered using the flutter_html package',
homepage: 'https://github.com/Sub6Resources/flutter_html',
authors: [],
version: '3.0.0-beta.2',
version: '3.0.0',
license: '''MIT License

Copyright (c) 2019-2022 The flutter_html developers
Copyright (c) 2019-2025 The flutter_html developers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -5461,14 +5461,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.''',
isSdk: false,
dependencies: [PackageRef('collection')]);

/// html 0.15.4
/// html 0.15.5
const _html = Package(
name: 'html',
description:
'APIs for parsing and manipulating HTML content outside the browser.',
repository: 'https://github.com/dart-lang/html',
repository: 'https://github.com/dart-lang/tools/tree/main/pkgs/html',
authors: [],
version: '0.15.4',
version: '0.15.5',
license: '''Copyright (c) 2006-2012 The Authors

Contributors:
Expand Down Expand Up @@ -7226,15 +7226,15 @@ SOFTWARE.''',
PackageRef('plugin_platform_interface')
]);

/// package_config 2.1.1
/// package_config 2.2.0
const _package_config = Package(
name: 'package_config',
description:
'Support for reading and writing Dart Package Configuration files.',
repository:
'https://github.com/dart-lang/tools/tree/main/pkgs/package_config',
authors: [],
version: '2.1.1',
version: '2.2.0',
license: '''Copyright 2019, the Dart project authors.

Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -11083,7 +11083,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.''',
PackageRef('web_socket')
]);

/// win32 5.11.0
/// win32 5.12.0
const _win32 = Package(
name: 'win32',
description:
Expand All @@ -11092,7 +11092,7 @@ const _win32 = Package(
homepage: 'https://win32.pub',
repository: 'https://github.com/halildurmus/win32',
authors: [],
version: '5.11.0',
version: '5.12.0',
license: '''BSD 3-Clause License

Copyright (c) 2024, Halil Durmus
Expand Down
28 changes: 14 additions & 14 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ packages:
dependency: transitive
description:
name: args
sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6
sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04
url: "https://pub.dev"
source: hosted
version: "2.6.0"
version: "2.7.0"
async:
dependency: transitive
description:
Expand Down Expand Up @@ -202,10 +202,10 @@ packages:
dependency: transitive
description:
name: csslib
sha256: "831883fb353c8bdc1d71979e5b342c7d88acfbc643113c14ae51e2442ea0f20f"
sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e"
url: "https://pub.dev"
source: hosted
version: "0.17.3"
version: "1.0.2"
cupertino_icons:
dependency: "direct main"
description:
Expand Down Expand Up @@ -311,18 +311,18 @@ packages:
dependency: "direct main"
description:
name: flutter_html
sha256: "02ad69e813ecfc0728a455e4bf892b9379983e050722b1dce00192ee2e41d1ee"
sha256: "38a2fd702ffdf3243fb7441ab58aa1bc7e6922d95a50db76534de8260638558d"
url: "https://pub.dev"
source: hosted
version: "3.0.0-beta.2"
version: "3.0.0"
flutter_html_table:
dependency: "direct main"
description:
name: flutter_html_table
sha256: e20c72d67ea2512e7b4949f6f7dd13d004e773b0f82c586a21f895e6bd90383c
sha256: de15300b1f6d8014e1702e7edfdf3411f362c8fb753e89bac4c99215ea94a4d8
url: "https://pub.dev"
source: hosted
version: "3.0.0-beta.2"
version: "3.0.0"
flutter_inappwebview:
dependency: "direct main"
description:
Expand Down Expand Up @@ -505,10 +505,10 @@ packages:
dependency: "direct main"
description:
name: html
sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a"
sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec"
url: "https://pub.dev"
source: hosted
version: "0.15.4"
version: "0.15.5"
http:
dependency: "direct main"
description:
Expand Down Expand Up @@ -721,10 +721,10 @@ packages:
dependency: transitive
description:
name: package_config
sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67"
sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.2.0"
package_info_plus:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1342,10 +1342,10 @@ packages:
dependency: transitive
description:
name: win32
sha256: b89e6e24d1454e149ab20fbb225af58660f0c0bf4475544650700d8e2da54aef
sha256: dc6ecaa00a7c708e5b4d10ee7bec8c270e9276dfcab1783f57e9962d7884305f
url: "https://pub.dev"
source: hosted
version: "5.11.0"
version: "5.12.0"
workmanager:
dependency: "direct main"
description:
Expand Down
Loading