Merge branch 'feature/create-post-redesign' of https://github.com/krawieck/lemmur into feature/create-post-redesign

This commit is contained in:
Filip Krawczyk 2022-04-30 17:29:31 +02:00
commit d2c85cb305
14 changed files with 55 additions and 42 deletions

View File

@ -110,10 +110,6 @@ jobs:
with:
channel: "stable"
- name: Enable windows support
run: |
flutter config --enable-windows-desktop
- name: Build
run: |
flutter build windows --release --target lib/main_prod.dart

View File

@ -119,10 +119,6 @@ jobs:
with:
channel: "stable"
- name: Enable windows support
run: |
flutter config --enable-windows-desktop
- name: Build
run: |
flutter build windows --release --target lib/main_prod.dart

View File

@ -1,6 +1,7 @@
name: weblate
on:
workflow_dispatch:
schedule:
# every friday at 19:00 UTC
- cron: "0 19 * * 5"
@ -11,10 +12,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fetch changes
run: |
git remote add weblate http://weblate.yerbamate.ml/git/lemmur/lemmur
git remote add weblate https://weblate.yerbamate.ml/git/lemmur/lemmur/
git fetch weblate
git merge weblate/master

View File

@ -55,11 +55,7 @@ The executable will be in `build/linux/x64/release/bundle/lemmur` (be aware, how
### Windows
1. Make sure you have the additional [windows requirements](https://flutter.dev/desktop#additional-windows-requirements) (verify with `flutter doctor`)
2. Enable windows desktop:
```sh
flutter config --enable-windows-desktop
```
3. Build: `flutter build windows --target lib/main_prod.dart --release`
2. Build: `flutter build windows --target lib/main_prod.dart --release`
The executable will be in `build\windows\runner\Release\lemmur.exe` (be aware, however, that this executable is not standalone)

View File

@ -5,6 +5,7 @@ linter:
- 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
@ -29,6 +30,7 @@ linter:
- 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
@ -41,8 +43,11 @@ linter:
- invariant_booleans
- 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
@ -81,7 +86,9 @@ linter:
- 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
@ -94,6 +101,7 @@ linter:
- unnecessary_constructor_name
- unnecessary_getters_setters
- unnecessary_lambdas
- unnecessary_late
- unnecessary_new
- unnecessary_null_aware_assignments
- unnecessary_null_checks

View File

@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 30
compileSdkVersion 31
lintOptions {
disable 'InvalidPackage'

View File

@ -7,7 +7,7 @@
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
<application
android:name="io.flutter.app.FlutterApplication"
android:name="${applicationName}"
android:label="${appName}"
android:icon="@mipmap/ic_launcher">

View File

@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.5.31'
repositories {
google()
mavenCentral()

View File

@ -60,15 +60,14 @@ class CommunitiesTab extends HookWidget {
return Future.wait(futures);
}
final _loggedInAccounts = accountsStore.loggedInInstances
final loggedInAccounts = accountsStore.loggedInInstances
.map((instanceHost) =>
'$instanceHost${accountsStore.defaultUsernameFor(instanceHost)}')
.toList();
final instancesRefreshable =
useRefreshable(getInstances, _loggedInAccounts);
final instancesRefreshable = useRefreshable(getInstances, loggedInAccounts);
final communitiesRefreshable =
useRefreshable(getCommunities, _loggedInAccounts);
useRefreshable(getCommunities, loggedInAccounts);
if (communitiesRefreshable.snapshot.hasError ||
instancesRefreshable.snapshot.hasError) {

View File

@ -70,6 +70,8 @@ abstract class _AsyncStore<T> with Store {
}
rethrow;
}
return null;
}
/// [run] but specialized for a [LemmyApiQuery].
@ -93,6 +95,8 @@ abstract class _AsyncStore<T> with Store {
asyncState = AsyncState<T>.error(err.message);
}
}
return null;
}
/// helper function for mapping [asyncState] into 3 variants

View File

@ -7,21 +7,21 @@ packages:
name: _fe_analyzer_shared
url: "https://pub.dartlang.org"
source: hosted
version: "33.0.0"
version: "34.0.0"
analyzer:
dependency: transitive
description:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
version: "3.2.0"
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.8"
version: "3.1.11"
args:
dependency: transitive
description:
@ -283,7 +283,7 @@ packages:
name: flutter_mobx
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3+2"
version: "2.0.4"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
@ -398,7 +398,7 @@ packages:
name: image_picker
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.4+4"
version: "0.8.4+6"
image_picker_for_web:
dependency: transitive
description:
@ -490,6 +490,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
matrix4_transform:
dependency: "direct main"
description:
@ -762,7 +769,7 @@ packages:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.12"
version: "2.0.13"
shared_preferences_android:
dependency: transitive
description:
@ -893,14 +900,14 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.3"
version: "0.4.8"
timeago:
dependency: "direct main"
description:
name: timeago
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
version: "3.2.1"
timing:
dependency: transitive
description:
@ -942,14 +949,14 @@ packages:
name: url_launcher_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
version: "2.0.3"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
version: "2.0.3"
url_launcher_platform_interface:
dependency: transitive
description:
@ -963,7 +970,7 @@ packages:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.6"
version: "2.0.8"
url_launcher_windows:
dependency: transitive
description:
@ -1005,14 +1012,14 @@ packages:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.3"
version: "2.3.10"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0"
version: "0.2.0+1"
xml:
dependency: transitive
description:
@ -1028,5 +1035,5 @@ packages:
source: hosted
version: "3.1.0"
sdks:
dart: ">=2.15.0 <3.0.0"
flutter: ">=2.8.0"
dart: ">=2.16.0 <3.0.0"
flutter: ">=2.10.0"

View File

@ -18,8 +18,8 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 0.8.0+19
environment:
sdk: ">=2.15.0 <3.0.0"
flutter: ">=2.8.0 <3.0.0"
sdk: ">=2.16.0 <3.0.0"
flutter: ">=2.10.0 <3.0.0"
dependencies:
# widgets
@ -50,7 +50,7 @@ dependencies:
lemmy_api_client: ^0.19.0
intl: ^0.17.0
matrix4_transform: ^2.0.0
json_annotation: ^4.3.0
json_annotation: ^4.4.0
keyboard_dismisser: ^2.0.0
freezed_annotation: ^1.0.0
logging: ^1.0.1

View File

@ -2,11 +2,13 @@
// Generated file. Do not edit.
//
// clang-format off
#include "generated_plugin_registrant.h"
#include <url_launcher_windows/url_launcher_plugin.h>
#include <url_launcher_windows/url_launcher_windows.h>
void RegisterPlugins(flutter::PluginRegistry* registry) {
UrlLauncherPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherPlugin"));
UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
}

View File

@ -2,6 +2,8 @@
// Generated file. Do not edit.
//
// clang-format off
#ifndef GENERATED_PLUGIN_REGISTRANT_
#define GENERATED_PLUGIN_REGISTRANT_