Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
shiosyakeyakini-info committed Nov 10, 2024
1 parent e0b8661 commit 00541cb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/view/user_page/user_info_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ class UserInfoNotifier extends _$UserInfoNotifier {
final expires = await ref.read(appRouterProvider).push<Expire?>(
const ExpireSelectRoute(),
);
if (expires == null) return null;
if (expires == null) {
await ref.read(appRouterProvider).maybePop();
return null;
}
final expiresDate = expires == Expire.indefinite
? null
: DateTime.now().add(expires.expires!);
Expand Down Expand Up @@ -292,7 +295,10 @@ class UserInfoNotifier extends _$UserInfoNotifier {
S.of(context).cancel,
],
);
if (confirm == 1) return null;
if (confirm == 1) {
await ref.read(appRouterProvider).maybePop();
return null;
}

return await _dialog.guard(() async {
await _postMisskey.blocking.create(BlockCreateRequest(userId: userId));
Expand Down

0 comments on commit 00541cb

Please sign in to comment.