diff --git a/app/lib/ui/flow/space/join/join_space_view_model.dart b/app/lib/ui/flow/space/join/join_space_view_model.dart index 1c5fc58..701c3e7 100644 --- a/app/lib/ui/flow/space/join/join_space_view_model.dart +++ b/app/lib/ui/flow/space/join/join_space_view_model.dart @@ -30,7 +30,7 @@ class JoinSpaceViewNotifier extends StateNotifier { Future joinSpace() async { try { - spaceService.joinSpace(state.spaceId); + spaceService.joinSpace(state.space?.id ?? ''); state = state.copyWith(verifying: false, spaceJoined: true, error: null); } catch (error, stack) { state = state.copyWith(error: error, verifying: false); @@ -95,7 +95,6 @@ class JoinSpaceViewState with _$JoinSpaceViewState { @Default(false) bool verifying, @Default(false) bool spaceJoined, @Default('') String invitationCode, - @Default('') String spaceId, @Default(false) bool errorInvalidInvitationCode, @Default(false) bool alreadySpaceMember, Object? error, diff --git a/app/lib/ui/flow/space/join/join_space_view_model.freezed.dart b/app/lib/ui/flow/space/join/join_space_view_model.freezed.dart index 7f710fd..ccaa510 100644 --- a/app/lib/ui/flow/space/join/join_space_view_model.freezed.dart +++ b/app/lib/ui/flow/space/join/join_space_view_model.freezed.dart @@ -19,7 +19,6 @@ mixin _$JoinSpaceViewState { bool get verifying => throw _privateConstructorUsedError; bool get spaceJoined => throw _privateConstructorUsedError; String get invitationCode => throw _privateConstructorUsedError; - String get spaceId => throw _privateConstructorUsedError; bool get errorInvalidInvitationCode => throw _privateConstructorUsedError; bool get alreadySpaceMember => throw _privateConstructorUsedError; Object? get error => throw _privateConstructorUsedError; @@ -40,7 +39,6 @@ abstract class $JoinSpaceViewStateCopyWith<$Res> { {bool verifying, bool spaceJoined, String invitationCode, - String spaceId, bool errorInvalidInvitationCode, bool alreadySpaceMember, Object? error, @@ -65,7 +63,6 @@ class _$JoinSpaceViewStateCopyWithImpl<$Res, $Val extends JoinSpaceViewState> Object? verifying = null, Object? spaceJoined = null, Object? invitationCode = null, - Object? spaceId = null, Object? errorInvalidInvitationCode = null, Object? alreadySpaceMember = null, Object? error = freezed, @@ -84,10 +81,6 @@ class _$JoinSpaceViewStateCopyWithImpl<$Res, $Val extends JoinSpaceViewState> ? _value.invitationCode : invitationCode // ignore: cast_nullable_to_non_nullable as String, - spaceId: null == spaceId - ? _value.spaceId - : spaceId // ignore: cast_nullable_to_non_nullable - as String, errorInvalidInvitationCode: null == errorInvalidInvitationCode ? _value.errorInvalidInvitationCode : errorInvalidInvitationCode // ignore: cast_nullable_to_non_nullable @@ -129,7 +122,6 @@ abstract class _$$JoinSpaceViewStateImplCopyWith<$Res> {bool verifying, bool spaceJoined, String invitationCode, - String spaceId, bool errorInvalidInvitationCode, bool alreadySpaceMember, Object? error, @@ -153,7 +145,6 @@ class __$$JoinSpaceViewStateImplCopyWithImpl<$Res> Object? verifying = null, Object? spaceJoined = null, Object? invitationCode = null, - Object? spaceId = null, Object? errorInvalidInvitationCode = null, Object? alreadySpaceMember = null, Object? error = freezed, @@ -172,10 +163,6 @@ class __$$JoinSpaceViewStateImplCopyWithImpl<$Res> ? _value.invitationCode : invitationCode // ignore: cast_nullable_to_non_nullable as String, - spaceId: null == spaceId - ? _value.spaceId - : spaceId // ignore: cast_nullable_to_non_nullable - as String, errorInvalidInvitationCode: null == errorInvalidInvitationCode ? _value.errorInvalidInvitationCode : errorInvalidInvitationCode // ignore: cast_nullable_to_non_nullable @@ -200,7 +187,6 @@ class _$JoinSpaceViewStateImpl implements _JoinSpaceViewState { {this.verifying = false, this.spaceJoined = false, this.invitationCode = '', - this.spaceId = '', this.errorInvalidInvitationCode = false, this.alreadySpaceMember = false, this.error, @@ -217,9 +203,6 @@ class _$JoinSpaceViewStateImpl implements _JoinSpaceViewState { final String invitationCode; @override @JsonKey() - final String spaceId; - @override - @JsonKey() final bool errorInvalidInvitationCode; @override @JsonKey() @@ -231,7 +214,7 @@ class _$JoinSpaceViewStateImpl implements _JoinSpaceViewState { @override String toString() { - return 'JoinSpaceViewState(verifying: $verifying, spaceJoined: $spaceJoined, invitationCode: $invitationCode, spaceId: $spaceId, errorInvalidInvitationCode: $errorInvalidInvitationCode, alreadySpaceMember: $alreadySpaceMember, error: $error, space: $space)'; + return 'JoinSpaceViewState(verifying: $verifying, spaceJoined: $spaceJoined, invitationCode: $invitationCode, errorInvalidInvitationCode: $errorInvalidInvitationCode, alreadySpaceMember: $alreadySpaceMember, error: $error, space: $space)'; } @override @@ -245,7 +228,6 @@ class _$JoinSpaceViewStateImpl implements _JoinSpaceViewState { other.spaceJoined == spaceJoined) && (identical(other.invitationCode, invitationCode) || other.invitationCode == invitationCode) && - (identical(other.spaceId, spaceId) || other.spaceId == spaceId) && (identical(other.errorInvalidInvitationCode, errorInvalidInvitationCode) || other.errorInvalidInvitationCode == @@ -262,7 +244,6 @@ class _$JoinSpaceViewStateImpl implements _JoinSpaceViewState { verifying, spaceJoined, invitationCode, - spaceId, errorInvalidInvitationCode, alreadySpaceMember, const DeepCollectionEquality().hash(error), @@ -281,7 +262,6 @@ abstract class _JoinSpaceViewState implements JoinSpaceViewState { {final bool verifying, final bool spaceJoined, final String invitationCode, - final String spaceId, final bool errorInvalidInvitationCode, final bool alreadySpaceMember, final Object? error, @@ -294,8 +274,6 @@ abstract class _JoinSpaceViewState implements JoinSpaceViewState { @override String get invitationCode; @override - String get spaceId; - @override bool get errorInvalidInvitationCode; @override bool get alreadySpaceMember;