Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/orl0pl/lemmon
Browse files Browse the repository at this point in the history
  • Loading branch information
orl0pl committed Jul 18, 2023
2 parents 36968db + 8c02889 commit 7ef45ad
Show file tree
Hide file tree
Showing 87 changed files with 595 additions and 496 deletions.
52 changes: 4 additions & 48 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: subosito/[email protected]

- uses: actions/checkout@v2

- uses: actions/setup-java@v1
Expand Down Expand Up @@ -85,53 +87,7 @@ jobs:

- uses: actions/upload-artifact@v2
with:
name: android-debug-apk
name: android-build
path: build/app/outputs/flutter-apk/

ios:
name: iOS
runs-on: macos-latest
needs: lint
steps:
- uses: actions/checkout@v2

- uses: subosito/flutter-action@v2
with:
channel: "stable"

- run: flutter build ios --no-codesign --release --target lib/main_prod.dart --flavor prod

linux:
name: Linux
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v2

- uses: subosito/flutter-action@v1
with:
channel: "stable"

- name: Get additional dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev
- name: Build
run: |
flutter build linux --release --target lib/main_prod.dart
windows:
name: Windows
runs-on: windows-latest
needs: lint
steps:
- uses: actions/checkout@v2

- uses: subosito/flutter-action@v1
with:
channel: "stable"

- name: Build
run: |
flutter build windows --release --target lib/main_prod.dart

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ From issues to wikis: everything is on [Lifttof GitHub Repo](https://github.com/

## Linting / Formatting

Everything is formatted with `dart format` (no flags) and linted with `dart analyze` ([see rules](analysis_options.yaml)). Both are enforced by the CI.
Everything is formatted with `dart format` (no flags) and linted with `flutter analyze` ([see rules](analysis_options.yaml)). Both are enforced by the CI.

## Translations

Expand Down
71 changes: 2 additions & 69 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,127 +1,60 @@
include: package:flutter_lints/flutter.yaml

linter:
rules:
- annotate_overrides
- avoid_bool_literals_in_conditional_expressions
- avoid_catching_errors
- avoid_equals_and_hash_code_on_mutable_classes
- avoid_escaping_inner_quotes
- avoid_final_parameters
- avoid_function_literals_in_foreach_calls
- avoid_init_to_null
- avoid_null_checks_in_equality_operators
- avoid_positional_boolean_parameters
- avoid_print
- avoid_private_typedef_functions
- avoid_redundant_argument_values
- avoid_relative_lib_imports
- avoid_return_types_on_setters
- avoid_returning_null
- avoid_returning_null_for_void
- avoid_returning_this
- avoid_setters_without_getters
- avoid_single_cascade_in_expression_statements
- avoid_type_to_string
- avoid_unnecessary_containers
- avoid_unused_constructor_parameters
- avoid_void_async
- await_only_futures
- camel_case_extensions
- camel_case_types
- cascade_invocations
- cast_nullable_to_non_nullable
- constant_identifier_names
- conditional_uri_does_not_exist
- curly_braces_in_flow_control_structures
- directives_ordering
- empty_catches
- empty_constructor_bodies
- eol_at_end_of_file
- exhaustive_cases
- file_names
- hash_and_equals
- implementation_imports
- library_names
- library_prefixes
- literal_only_boolean_expressions
- non_constant_identifier_names
- noop_primitive_operations
- no_leading_underscores_for_library_prefixes
- no_leading_underscores_for_local_identifiers
- null_check_on_nullable_type_parameter
- omit_local_variable_types
- one_member_abstracts
- package_api_docs
- parameter_assignments
- prefer_adjacent_string_concatenation
- prefer_asserts_in_initializer_lists
- prefer_collection_literals
- prefer_conditional_assignment
- prefer_const_constructors
- prefer_const_constructors_in_immutables
- prefer_const_declarations
- prefer_const_literals_to_create_immutables
- prefer_constructors_over_static_methods
- prefer_contains
- prefer_final_fields
- prefer_final_in_for_each
- prefer_final_locals
- prefer_for_elements_to_map_fromIterable
- prefer_function_declarations_over_variables
- prefer_generic_function_type_aliases
- prefer_if_elements_to_conditional_expressions
- prefer_if_null_operators
- prefer_initializing_formals
- prefer_int_literals
- prefer_interpolation_to_compose_strings
- prefer_is_empty
- prefer_is_not_empty
- prefer_is_not_operator
- prefer_iterable_whereType
- prefer_mixin
- prefer_null_aware_operators
- prefer_relative_imports
- prefer_single_quotes
- prefer_spread_collections
- prefer_typing_uninitialized_variables
- recursive_getters
- secure_pubspec_urls
- sized_box_for_whitespace
- sized_box_shrink_expand
- slash_for_doc_comments
- sort_child_properties_last
- sort_unnamed_constructors_first
- tighten_type_of_initializing_formals
- type_annotate_public_apis
- type_init_formals
- unawaited_futures
- unnecessary_brace_in_string_interps
- unnecessary_const
- unnecessary_constructor_name
- unnecessary_getters_setters
- unnecessary_lambdas
- unnecessary_late
- unnecessary_new
- unnecessary_null_aware_assignments
- unnecessary_null_checks
- unnecessary_null_in_if_null_operators
- unnecessary_parenthesis
- unnecessary_raw_strings
- unnecessary_string_escapes
- unnecessary_string_interpolations
- unnecessary_this
- unrelated_type_equality_checks
- use_colored_box
- use_enums
- use_full_hex_values_for_flutter_colors
- use_is_even_rather_than_modulo
- use_named_constants
- use_raw_strings
- use_rethrow_when_possible
- use_setters_to_change_properties
- use_super_parameters
- use_test_throws_matchers
- use_to_and_as_if_applicable
- void_checks

analyzer:
exclude:
Expand Down
95 changes: 41 additions & 54 deletions assets/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@
"@post_view": {},
"show_scores": "Show Scores",
"@show_scores": {},
"auto_play_video": "Auto Play Video",
"@auto_play_video": {},
"auto_mute_video": "Auto Mute Video",
"@auto_mute_video": {},
"font": "Font",
"@font": {},
"preview": "Preview",
Expand Down Expand Up @@ -218,9 +222,8 @@
"@federated_post_info": {},
"not_found": "Not found",
"@not_found": {},

"error": "Error: {error_text}",
"@error" :{
"@error": {
"placeholders": {
"error_text": {
"type": "String"
Expand Down Expand Up @@ -416,10 +419,10 @@
}
},
"set_as_default": "Set as default",
"@set_as_default" : {},
"import_settings" :"Import settings to Liftoff",
"@set_as_default": {},
"import_settings": "Import settings to Liftoff",
"@import_settings": {},
"import_successful" : "Import successful",
"import_successful": "Import successful",
"@import_successful": {},
"instance_url": "instance url",
"@instance_url": {},
Expand All @@ -441,26 +444,22 @@
}
}
},

"block": "Block",
"@block":{},
"@block": {},
"block_user": "Block user",
"@block_user":{},
"@block_user": {},
"no_users_blocked": "No users blocked",
"@no_users_blocked":{},
"@no_users_blocked": {},
"block_community": "Block community",
"@block_community":{},
"@block_community": {},
"no_communities_blocked": "No communities blocked",
"@no_communities_blocked":{},
"@no_communities_blocked": {},
"unblock": "Unblock",
"@unblock":{},
"@unblock": {},
"unblock_user": "Unblock user",
"@unblock_user":{},
"@unblock_user": {},
"unblock_community": "Unblock community",
"@unblock_community":{},



"@unblock_community": {},
"remove_account_confirm": "This will delete your account and data from this app. Your account and data will remain on the instance.",
"@remove_account_confirm": {},
"delete_account_confirm": "Warning: this will permanently delete your account and all of your data from the app AND instance. Your data may not be deleted on other, existing instances. Enter your password to confirm.",
Expand Down Expand Up @@ -540,32 +539,31 @@
"open_in_browser": "Open in browser",
"@open_in_browser": {},
"share_text": "Share text",
"@share_text":{},
"@share_text": {},
"share_url": "Share URL",
"@share_url":{},
"@share_url": {},
"translate": "Translate",
"@translate":{},
"@translate": {},
"make_text_selectable": "Make text selectable",
"@make_text_selectable":{},
"@make_text_selectable": {},
"make_text_unselectable": "Make text unselectable",
"@make_text_unselectable":{},
"@make_text_unselectable": {},
"show_fancy_text": "Show fancy text",
"@make_fancy_text":{},
"@make_fancy_text": {},
"show_raw_text": "Show raw text",
"@make_raw_text":{},
"@make_raw_text": {},
"delete_comment": "Delete comment",
"@delete_comment":{},
"@delete_comment": {},
"restore_comment": "Restore comment",
"@restore_comment":{},
"@restore_comment": {},
"report_comment": "Report comment",
"@report_comment":{},
"@report_comment": {},
"delete_post": "Delete post",
"@delete_post":{},
"@delete_post": {},
"restore_post": "Restore post",
"@restore_post":{},
"@restore_post": {},
"report_post": "Report post",
"@report_post":{},

"@report_post": {},
"cannot_open_in_browser": "Can't open in browser",
"@cannot_open_in_browser": {},
"about": "About",
Expand Down Expand Up @@ -687,36 +685,25 @@
"description": "shows up on a snackbar when the image upload failed"
},
"instance_error": "Hmm... it seems like your instance is having trouble responding.",
"@instance_error": {
},
"@instance_error": {},
"instance_record_notfound": "Hmm... it seems like your instance couldn't find what you were looking for.",
"@instance_record_notfound": {
},
"@instance_record_notfound": {},
"try_again": "Try Again",
"@try_again": {
},
"@try_again": {},
"kbin_instances_not_supported": "Please note that kbin instances are not supported at present.",
"@kbin_instances_not_supported": {
},
"@kbin_instances_not_supported": {},
"pick_a_photo": "Pick a photo",
"@pick_a_photo": {
},
"@pick_a_photo": {},
"use_this_image": "Use this image",
"@use_this_image": {
},
"@use_this_image": {},
"photo_picker_explanation": "Pick an image, then adjust the crop box to the right shape.\n\nYou can then drag the image until it's in the right place. \n\nResizing the crop box will zoom the selection in and out.",
"@photo_picker_explanation": {
},
"@photo_picker_explanation": {},
"accounts_explanation": "The first instance on this screen will be treated as your default in other screens, and the marked account will be the default on that instance.\n\nPress and hold on an account to make it your default on that instance.\n\nPress and hold an instance or account to remove it from this app. You can add it back later. You may lose some local settings but your bookmarks, subscriptions etc will still be held on your instance.",
"@accounts_explanation": {
},
"@accounts_explanation": {},
"comment_tag_op": "OP",
"@comment_tag_op": {
},
"@comment_tag_op": {},
"comment_tag_you": "YOU",
"@comment_tag_you": {
},
"@comment_tag_you": {},
"code_of_conduct_clickthrough": "By accessing the Lemmy network using Liftoff! you agree to adhere to our Code of Conduct",
"@code_of_conduct_clickthrough": {
}
}
"@code_of_conduct_clickthrough": {}
}
2 changes: 1 addition & 1 deletion lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final l10nDelegates = [
];

class MyApp extends StatelessWidget {
const MyApp();
const MyApp({super.key});

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/app_link_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import './util/goto.dart';
/// - liftoff://programming.dev/c/programmer_humor
/// - liftoff://lemmy.world/u/zachatrocity
class AppLinkHandler extends HookWidget {
AppLinkHandler(this.child);
AppLinkHandler(this.child, {super.key});

final Widget child;
final _appLinks = AppLinks();
Expand Down
2 changes: 1 addition & 1 deletion lib/comment_tree.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class CommentTree {
}

/// recursive sorter
void _sort(int compare(CommentTree a, CommentTree b)) {
void _sort(int Function(CommentTree a, CommentTree b) compare) {
children.sort(compare);
for (final el in children) {
el._sort(compare);
Expand Down
Loading

0 comments on commit 7ef45ad

Please sign in to comment.