Bump mobx

This commit is contained in:
shilangyu 2022-05-13 15:58:01 +02:00
parent 9f588a5ea8
commit 6136e4a408
8 changed files with 94 additions and 93 deletions

View File

@ -16,6 +16,7 @@ abstract class _CreatePostStore with Store {
_CreatePostStore({ _CreatePostStore({
required this.instanceHost, required this.instanceHost,
this.postToEdit, this.postToEdit,
// ignore: unused_element
this.selectedCommunity, this.selectedCommunity,
}) : title = postToEdit?.name ?? '', }) : title = postToEdit?.name ?? '',
nsfw = postToEdit?.nsfw ?? false, nsfw = postToEdit?.nsfw ?? false,

View File

@ -17,7 +17,8 @@ mixin _$CreatePostStore on _CreatePostStore, Store {
name: '_CreatePostStore.hasUploadedImage')) name: '_CreatePostStore.hasUploadedImage'))
.value; .value;
final _$showFancyAtom = Atom(name: '_CreatePostStore.showFancy'); late final _$showFancyAtom =
Atom(name: '_CreatePostStore.showFancy', context: context);
@override @override
bool get showFancy { bool get showFancy {
@ -32,7 +33,8 @@ mixin _$CreatePostStore on _CreatePostStore, Store {
}); });
} }
final _$instanceHostAtom = Atom(name: '_CreatePostStore.instanceHost'); late final _$instanceHostAtom =
Atom(name: '_CreatePostStore.instanceHost', context: context);
@override @override
String get instanceHost { String get instanceHost {
@ -47,8 +49,8 @@ mixin _$CreatePostStore on _CreatePostStore, Store {
}); });
} }
final _$selectedCommunityAtom = late final _$selectedCommunityAtom =
Atom(name: '_CreatePostStore.selectedCommunity'); Atom(name: '_CreatePostStore.selectedCommunity', context: context);
@override @override
CommunityView? get selectedCommunity { CommunityView? get selectedCommunity {
@ -63,7 +65,7 @@ mixin _$CreatePostStore on _CreatePostStore, Store {
}); });
} }
final _$urlAtom = Atom(name: '_CreatePostStore.url'); late final _$urlAtom = Atom(name: '_CreatePostStore.url', context: context);
@override @override
String get url { String get url {
@ -78,7 +80,8 @@ mixin _$CreatePostStore on _CreatePostStore, Store {
}); });
} }
final _$titleAtom = Atom(name: '_CreatePostStore.title'); late final _$titleAtom =
Atom(name: '_CreatePostStore.title', context: context);
@override @override
String get title { String get title {
@ -93,7 +96,7 @@ mixin _$CreatePostStore on _CreatePostStore, Store {
}); });
} }
final _$bodyAtom = Atom(name: '_CreatePostStore.body'); late final _$bodyAtom = Atom(name: '_CreatePostStore.body', context: context);
@override @override
String get body { String get body {
@ -108,7 +111,7 @@ mixin _$CreatePostStore on _CreatePostStore, Store {
}); });
} }
final _$nsfwAtom = Atom(name: '_CreatePostStore.nsfw'); late final _$nsfwAtom = Atom(name: '_CreatePostStore.nsfw', context: context);
@override @override
bool get nsfw { bool get nsfw {
@ -123,14 +126,16 @@ mixin _$CreatePostStore on _CreatePostStore, Store {
}); });
} }
final _$submitAsyncAction = AsyncAction('_CreatePostStore.submit'); late final _$submitAsyncAction =
AsyncAction('_CreatePostStore.submit', context: context);
@override @override
Future<void> submit(Jwt token) { Future<void> submit(Jwt token) {
return _$submitAsyncAction.run(() => super.submit(token)); return _$submitAsyncAction.run(() => super.submit(token));
} }
final _$uploadImageAsyncAction = AsyncAction('_CreatePostStore.uploadImage'); late final _$uploadImageAsyncAction =
AsyncAction('_CreatePostStore.uploadImage', context: context);
@override @override
Future<void> uploadImage(String filePath, Jwt token) { Future<void> uploadImage(String filePath, Jwt token) {
@ -138,8 +143,8 @@ mixin _$CreatePostStore on _CreatePostStore, Store {
.run(() => super.uploadImage(filePath, token)); .run(() => super.uploadImage(filePath, token));
} }
final _$_CreatePostStoreActionController = late final _$_CreatePostStoreActionController =
ActionController(name: '_CreatePostStore'); ActionController(name: '_CreatePostStore', context: context);
@override @override
Future<List<CommunityView>?> searchCommunities( Future<List<CommunityView>?> searchCommunities(

View File

@ -14,7 +14,6 @@ abstract class _FullPostStore with Store {
final String instanceHost; final String instanceHost;
_FullPostStore({ _FullPostStore({
this.postStore,
required this.postId, required this.postId,
required this.instanceHost, required this.instanceHost,
}); });

View File

@ -12,6 +12,7 @@ abstract class _ModlogPageStore with Store, DisposableStore {
final String instanceHost; final String instanceHost;
final int? communityId; final int? communityId;
// ignore: unused_element
_ModlogPageStore(this.instanceHost, [this.communityId]) { _ModlogPageStore(this.instanceHost, [this.communityId]) {
addReaction(reaction((_) => page, (_) => fetchPage())); addReaction(reaction((_) => page, (_) => fetchPage()));
} }

View File

@ -86,22 +86,22 @@ class _$AsyncStateCopyWithImpl<T, $Res>
} }
/// @nodoc /// @nodoc
abstract class $AsyncStateInitialCopyWith<T, $Res> { abstract class _$$AsyncStateInitialCopyWith<T, $Res> {
factory $AsyncStateInitialCopyWith(AsyncStateInitial<T> value, factory _$$AsyncStateInitialCopyWith(_$AsyncStateInitial<T> value,
$Res Function(AsyncStateInitial<T>) then) = $Res Function(_$AsyncStateInitial<T>) then) =
_$AsyncStateInitialCopyWithImpl<T, $Res>; __$$AsyncStateInitialCopyWithImpl<T, $Res>;
} }
/// @nodoc /// @nodoc
class _$AsyncStateInitialCopyWithImpl<T, $Res> class __$$AsyncStateInitialCopyWithImpl<T, $Res>
extends _$AsyncStateCopyWithImpl<T, $Res> extends _$AsyncStateCopyWithImpl<T, $Res>
implements $AsyncStateInitialCopyWith<T, $Res> { implements _$$AsyncStateInitialCopyWith<T, $Res> {
_$AsyncStateInitialCopyWithImpl( __$$AsyncStateInitialCopyWithImpl(_$AsyncStateInitial<T> _value,
AsyncStateInitial<T> _value, $Res Function(AsyncStateInitial<T>) _then) $Res Function(_$AsyncStateInitial<T>) _then)
: super(_value, (v) => _then(v as AsyncStateInitial<T>)); : super(_value, (v) => _then(v as _$AsyncStateInitial<T>));
@override @override
AsyncStateInitial<T> get _value => super._value as AsyncStateInitial<T>; _$AsyncStateInitial<T> get _value => super._value as _$AsyncStateInitial<T>;
} }
/// @nodoc /// @nodoc
@ -125,7 +125,7 @@ class _$AsyncStateInitial<T>
@override @override
bool operator ==(dynamic other) { bool operator ==(dynamic other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && other is AsyncStateInitial<T>); (other.runtimeType == runtimeType && other is _$AsyncStateInitial<T>);
} }
@override @override
@ -211,30 +211,30 @@ abstract class AsyncStateInitial<T> implements AsyncState<T> {
} }
/// @nodoc /// @nodoc
abstract class $AsyncStateDataCopyWith<T, $Res> { abstract class _$$AsyncStateDataCopyWith<T, $Res> {
factory $AsyncStateDataCopyWith( factory _$$AsyncStateDataCopyWith(
AsyncStateData<T> value, $Res Function(AsyncStateData<T>) then) = _$AsyncStateData<T> value, $Res Function(_$AsyncStateData<T>) then) =
_$AsyncStateDataCopyWithImpl<T, $Res>; __$$AsyncStateDataCopyWithImpl<T, $Res>;
$Res call({T data, String? errorTerm}); $Res call({T data, String? errorTerm});
} }
/// @nodoc /// @nodoc
class _$AsyncStateDataCopyWithImpl<T, $Res> class __$$AsyncStateDataCopyWithImpl<T, $Res>
extends _$AsyncStateCopyWithImpl<T, $Res> extends _$AsyncStateCopyWithImpl<T, $Res>
implements $AsyncStateDataCopyWith<T, $Res> { implements _$$AsyncStateDataCopyWith<T, $Res> {
_$AsyncStateDataCopyWithImpl( __$$AsyncStateDataCopyWithImpl(
AsyncStateData<T> _value, $Res Function(AsyncStateData<T>) _then) _$AsyncStateData<T> _value, $Res Function(_$AsyncStateData<T>) _then)
: super(_value, (v) => _then(v as AsyncStateData<T>)); : super(_value, (v) => _then(v as _$AsyncStateData<T>));
@override @override
AsyncStateData<T> get _value => super._value as AsyncStateData<T>; _$AsyncStateData<T> get _value => super._value as _$AsyncStateData<T>;
@override @override
$Res call({ $Res call({
Object? data = freezed, Object? data = freezed,
Object? errorTerm = freezed, Object? errorTerm = freezed,
}) { }) {
return _then(AsyncStateData<T>( return _then(_$AsyncStateData<T>(
data == freezed data == freezed
? _value.data ? _value.data
: data // ignore: cast_nullable_to_non_nullable : data // ignore: cast_nullable_to_non_nullable
@ -277,7 +277,7 @@ class _$AsyncStateData<T>
bool operator ==(dynamic other) { bool operator ==(dynamic other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is AsyncStateData<T> && other is _$AsyncStateData<T> &&
const DeepCollectionEquality().equals(other.data, data) && const DeepCollectionEquality().equals(other.data, data) &&
const DeepCollectionEquality().equals(other.errorTerm, errorTerm)); const DeepCollectionEquality().equals(other.errorTerm, errorTerm));
} }
@ -290,8 +290,8 @@ class _$AsyncStateData<T>
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
$AsyncStateDataCopyWith<T, AsyncStateData<T>> get copyWith => _$$AsyncStateDataCopyWith<T, _$AsyncStateData<T>> get copyWith =>
_$AsyncStateDataCopyWithImpl<T, AsyncStateData<T>>(this, _$identity); __$$AsyncStateDataCopyWithImpl<T, _$AsyncStateData<T>>(this, _$identity);
@override @override
@optionalTypeArgs @optionalTypeArgs
@ -375,27 +375,27 @@ abstract class AsyncStateData<T> implements AsyncState<T> {
T get data => throw _privateConstructorUsedError; T get data => throw _privateConstructorUsedError;
String? get errorTerm => throw _privateConstructorUsedError; String? get errorTerm => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$AsyncStateDataCopyWith<T, AsyncStateData<T>> get copyWith => _$$AsyncStateDataCopyWith<T, _$AsyncStateData<T>> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class $AsyncStateLoadingCopyWith<T, $Res> { abstract class _$$AsyncStateLoadingCopyWith<T, $Res> {
factory $AsyncStateLoadingCopyWith(AsyncStateLoading<T> value, factory _$$AsyncStateLoadingCopyWith(_$AsyncStateLoading<T> value,
$Res Function(AsyncStateLoading<T>) then) = $Res Function(_$AsyncStateLoading<T>) then) =
_$AsyncStateLoadingCopyWithImpl<T, $Res>; __$$AsyncStateLoadingCopyWithImpl<T, $Res>;
} }
/// @nodoc /// @nodoc
class _$AsyncStateLoadingCopyWithImpl<T, $Res> class __$$AsyncStateLoadingCopyWithImpl<T, $Res>
extends _$AsyncStateCopyWithImpl<T, $Res> extends _$AsyncStateCopyWithImpl<T, $Res>
implements $AsyncStateLoadingCopyWith<T, $Res> { implements _$$AsyncStateLoadingCopyWith<T, $Res> {
_$AsyncStateLoadingCopyWithImpl( __$$AsyncStateLoadingCopyWithImpl(_$AsyncStateLoading<T> _value,
AsyncStateLoading<T> _value, $Res Function(AsyncStateLoading<T>) _then) $Res Function(_$AsyncStateLoading<T>) _then)
: super(_value, (v) => _then(v as AsyncStateLoading<T>)); : super(_value, (v) => _then(v as _$AsyncStateLoading<T>));
@override @override
AsyncStateLoading<T> get _value => super._value as AsyncStateLoading<T>; _$AsyncStateLoading<T> get _value => super._value as _$AsyncStateLoading<T>;
} }
/// @nodoc /// @nodoc
@ -419,7 +419,7 @@ class _$AsyncStateLoading<T>
@override @override
bool operator ==(dynamic other) { bool operator ==(dynamic other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && other is AsyncStateLoading<T>); (other.runtimeType == runtimeType && other is _$AsyncStateLoading<T>);
} }
@override @override
@ -505,29 +505,29 @@ abstract class AsyncStateLoading<T> implements AsyncState<T> {
} }
/// @nodoc /// @nodoc
abstract class $AsyncStateErrorCopyWith<T, $Res> { abstract class _$$AsyncStateErrorCopyWith<T, $Res> {
factory $AsyncStateErrorCopyWith( factory _$$AsyncStateErrorCopyWith(_$AsyncStateError<T> value,
AsyncStateError<T> value, $Res Function(AsyncStateError<T>) then) = $Res Function(_$AsyncStateError<T>) then) =
_$AsyncStateErrorCopyWithImpl<T, $Res>; __$$AsyncStateErrorCopyWithImpl<T, $Res>;
$Res call({String errorTerm}); $Res call({String errorTerm});
} }
/// @nodoc /// @nodoc
class _$AsyncStateErrorCopyWithImpl<T, $Res> class __$$AsyncStateErrorCopyWithImpl<T, $Res>
extends _$AsyncStateCopyWithImpl<T, $Res> extends _$AsyncStateCopyWithImpl<T, $Res>
implements $AsyncStateErrorCopyWith<T, $Res> { implements _$$AsyncStateErrorCopyWith<T, $Res> {
_$AsyncStateErrorCopyWithImpl( __$$AsyncStateErrorCopyWithImpl(
AsyncStateError<T> _value, $Res Function(AsyncStateError<T>) _then) _$AsyncStateError<T> _value, $Res Function(_$AsyncStateError<T>) _then)
: super(_value, (v) => _then(v as AsyncStateError<T>)); : super(_value, (v) => _then(v as _$AsyncStateError<T>));
@override @override
AsyncStateError<T> get _value => super._value as AsyncStateError<T>; _$AsyncStateError<T> get _value => super._value as _$AsyncStateError<T>;
@override @override
$Res call({ $Res call({
Object? errorTerm = freezed, Object? errorTerm = freezed,
}) { }) {
return _then(AsyncStateError<T>( return _then(_$AsyncStateError<T>(
errorTerm == freezed errorTerm == freezed
? _value.errorTerm ? _value.errorTerm
: errorTerm // ignore: cast_nullable_to_non_nullable : errorTerm // ignore: cast_nullable_to_non_nullable
@ -563,7 +563,7 @@ class _$AsyncStateError<T>
bool operator ==(dynamic other) { bool operator ==(dynamic other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is AsyncStateError<T> && other is _$AsyncStateError<T> &&
const DeepCollectionEquality().equals(other.errorTerm, errorTerm)); const DeepCollectionEquality().equals(other.errorTerm, errorTerm));
} }
@ -573,8 +573,9 @@ class _$AsyncStateError<T>
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
$AsyncStateErrorCopyWith<T, AsyncStateError<T>> get copyWith => _$$AsyncStateErrorCopyWith<T, _$AsyncStateError<T>> get copyWith =>
_$AsyncStateErrorCopyWithImpl<T, AsyncStateError<T>>(this, _$identity); __$$AsyncStateErrorCopyWithImpl<T, _$AsyncStateError<T>>(
this, _$identity);
@override @override
@optionalTypeArgs @optionalTypeArgs
@ -656,6 +657,6 @@ abstract class AsyncStateError<T> implements AsyncState<T> {
String get errorTerm => throw _privateConstructorUsedError; String get errorTerm => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$AsyncStateErrorCopyWith<T, AsyncStateError<T>> get copyWith => _$$AsyncStateErrorCopyWith<T, _$AsyncStateError<T>> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }

View File

@ -54,6 +54,7 @@ abstract class _CommentStore with Store {
_CommentStore( _CommentStore(
this._accountsStore, { this._accountsStore, {
required CommentTree commentTree, required CommentTree commentTree,
// ignore: unused_element
this.userMentionId, this.userMentionId,
required this.depth, required this.depth,
required this.canBeMarkedAsRead, required this.canBeMarkedAsRead,

View File

@ -7,14 +7,14 @@ packages:
name: _fe_analyzer_shared name: _fe_analyzer_shared
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "34.0.0" version: "39.0.0"
analyzer: analyzer:
dependency: transitive dependency: transitive
description: description:
name: analyzer name: analyzer
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.2.0" version: "4.0.0"
archive: archive:
dependency: transitive dependency: transitive
description: description:
@ -28,7 +28,7 @@ packages:
name: args name: args
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.3.0" version: "2.3.1"
async: async:
dependency: transitive dependency: transitive
description: description:
@ -70,7 +70,7 @@ packages:
name: build_resolvers name: build_resolvers
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.6" version: "2.0.8"
build_runner: build_runner:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -120,13 +120,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.1" version: "2.0.1"
cli_util:
dependency: transitive
description:
name: cli_util
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.5"
clock: clock:
dependency: transitive dependency: transitive
description: description:
@ -175,21 +168,21 @@ packages:
name: dart_style name: dart_style
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.2.1" version: "2.2.3"
extended_image: extended_image:
dependency: "direct main" dependency: "direct main"
description: description:
name: extended_image name: extended_image
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "6.1.0" version: "6.2.0"
extended_image_library: extended_image_library:
dependency: transitive dependency: transitive
description: description:
name: extended_image_library name: extended_image_library
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.2.0" version: "3.3.0"
fake_async: fake_async:
dependency: transitive dependency: transitive
description: description:
@ -203,7 +196,7 @@ packages:
name: ffi name: ffi
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.2" version: "1.2.1"
file: file:
dependency: transitive dependency: transitive
description: description:
@ -224,7 +217,7 @@ packages:
name: fixnum name: fixnum
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.0" version: "1.0.1"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@ -236,7 +229,7 @@ packages:
name: flutter_hooks name: flutter_hooks
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.18.3" version: "0.18.4"
flutter_keyboard_visibility: flutter_keyboard_visibility:
dependency: transitive dependency: transitive
description: description:
@ -321,7 +314,7 @@ packages:
name: freezed name: freezed
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.3" version: "2.0.3+1"
freezed_annotation: freezed_annotation:
dependency: "direct main" dependency: "direct main"
description: description:
@ -398,7 +391,7 @@ packages:
name: image_picker name: image_picker
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.8.5+2" version: "0.8.5+3"
image_picker_android: image_picker_android:
dependency: transitive dependency: transitive
description: description:
@ -426,7 +419,7 @@ packages:
name: image_picker_platform_interface name: image_picker_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.4.4" version: "2.5.0"
intl: intl:
dependency: "direct main" dependency: "direct main"
description: description:
@ -479,10 +472,10 @@ packages:
lemmy_api_client: lemmy_api_client:
dependency: "direct main" dependency: "direct main"
description: description:
path: "/home/shilangyu/coding/lemmy_api_client" name: lemmy_api_client
relative: false url: "https://pub.dartlang.org"
source: path source: hosted
version: "0.20.0" version: "0.21.0"
logging: logging:
dependency: "direct main" dependency: "direct main"
description: description:
@ -545,7 +538,7 @@ packages:
name: mobx_codegen name: mobx_codegen
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.6" version: "2.0.6+1"
modal_bottom_sheet: modal_bottom_sheet:
dependency: "direct main" dependency: "direct main"
description: description:
@ -928,7 +921,7 @@ packages:
name: typed_data name: typed_data
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0" version: "1.3.1"
url_launcher: url_launcher:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1040,7 +1033,7 @@ packages:
name: yaml name: yaml
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.1.0" version: "3.1.1"
sdks: sdks:
dart: ">=2.17.0 <3.0.0" dart: ">=2.17.0 <3.0.0"
flutter: ">=3.0.0" flutter: ">=3.0.0"

View File

@ -47,7 +47,7 @@ dependencies:
# utils # utils
timeago: ^3.0.2 timeago: ^3.0.2
fuzzy: ^0.4.0-nullsafety.0 fuzzy: ^0.4.0-nullsafety.0
lemmy_api_client: ^0.20.0 lemmy_api_client: ^0.21.0
intl: ^0.17.0 intl: ^0.17.0
matrix4_transform: ^2.0.0 matrix4_transform: ^2.0.0
json_annotation: ^4.5.0 json_annotation: ^4.5.0