Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
poppingmoon committed Oct 16, 2023
1 parent 890ffc8 commit 4613f3d
Show file tree
Hide file tree
Showing 22 changed files with 1,161 additions and 1,162 deletions.
7 changes: 0 additions & 7 deletions lib/extensions/users_show_response_extension.dart

This file was deleted.

6 changes: 3 additions & 3 deletions lib/model/account.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Account with _$Account {
required String host,
required String userId,
String? token,
required IResponse i,
required MeDetailed i,
}) = _Account;

factory Account.fromJson(Map<String, Object?> json) =>
Expand All @@ -33,7 +33,7 @@ class Account with _$Account {
host: host,
userId: "",
token: null,
i: IResponse(
i: MeDetailed(
id: "",
username: "",
createdAt: DateTime.now(),
Expand All @@ -48,7 +48,7 @@ class Account with _$Account {
followersCount: 0,
notesCount: 0,
publicReactions: false,
ffVisibility: "",
ffVisibility: FFVisibility.public,
twoFactorEnabled: false,
usePasswordLessLogin: false,
securityKeys: false,
Expand Down
24 changes: 12 additions & 12 deletions lib/model/account.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mixin _$Account {
String get host => throw _privateConstructorUsedError;
String get userId => throw _privateConstructorUsedError;
String? get token => throw _privateConstructorUsedError;
IResponse get i => throw _privateConstructorUsedError;
MeDetailed get i => throw _privateConstructorUsedError;

Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
Expand All @@ -35,9 +35,9 @@ abstract class $AccountCopyWith<$Res> {
factory $AccountCopyWith(Account value, $Res Function(Account) then) =
_$AccountCopyWithImpl<$Res, Account>;
@useResult
$Res call({String host, String userId, String? token, IResponse i});
$Res call({String host, String userId, String? token, MeDetailed i});

$IResponseCopyWith<$Res> get i;
$MeDetailedCopyWith<$Res> get i;
}

/// @nodoc
Expand Down Expand Up @@ -74,14 +74,14 @@ class _$AccountCopyWithImpl<$Res, $Val extends Account>
i: null == i
? _value.i
: i // ignore: cast_nullable_to_non_nullable
as IResponse,
as MeDetailed,
) as $Val);
}

@override
@pragma('vm:prefer-inline')
$IResponseCopyWith<$Res> get i {
return $IResponseCopyWith<$Res>(_value.i, (value) {
$MeDetailedCopyWith<$Res> get i {
return $MeDetailedCopyWith<$Res>(_value.i, (value) {
return _then(_value.copyWith(i: value) as $Val);
});
}
Expand All @@ -94,10 +94,10 @@ abstract class _$$_AccountCopyWith<$Res> implements $AccountCopyWith<$Res> {
__$$_AccountCopyWithImpl<$Res>;
@override
@useResult
$Res call({String host, String userId, String? token, IResponse i});
$Res call({String host, String userId, String? token, MeDetailed i});

@override
$IResponseCopyWith<$Res> get i;
$MeDetailedCopyWith<$Res> get i;
}

/// @nodoc
Expand Down Expand Up @@ -131,7 +131,7 @@ class __$$_AccountCopyWithImpl<$Res>
i: null == i
? _value.i
: i // ignore: cast_nullable_to_non_nullable
as IResponse,
as MeDetailed,
));
}
}
Expand All @@ -153,7 +153,7 @@ class _$_Account extends _Account {
@override
final String? token;
@override
final IResponse i;
final MeDetailed i;

@override
String toString() {
Expand All @@ -179,7 +179,7 @@ abstract class _Account extends Account {
{required final String host,
required final String userId,
final String? token,
required final IResponse i}) = _$_Account;
required final MeDetailed i}) = _$_Account;
const _Account._() : super._();

factory _Account.fromJson(Map<String, dynamic> json) = _$_Account.fromJson;
Expand All @@ -191,7 +191,7 @@ abstract class _Account extends Account {
@override
String? get token;
@override
IResponse get i;
MeDetailed get i;
@override
@JsonKey(ignore: true)
_$$_AccountCopyWith<_$_Account> get copyWith =>
Expand Down
2 changes: 1 addition & 1 deletion lib/model/account.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/repository/tab_settings_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class TabSettingsRepository extends ChangeNotifier {
}
}

void updateAccount(Account account, IResponse response) {
void updateAccount(Account account, MeDetailed response) {
for (var i = 0; i < _tabSettings.length; i++) {
if (_tabSettings[i].account == account) {
_tabSettings[i] = _tabSettings[i]
Expand Down
Loading

0 comments on commit 4613f3d

Please sign in to comment.