🎨 Fix some warnings in the code
This commit is contained in:
@ -86,7 +86,7 @@ class AccountSettingsScreen extends HookConsumerWidget {
|
||||
).push(MaterialPageRoute(builder: (context) => CaptchaScreen()));
|
||||
if (captchaTk == null) return;
|
||||
try {
|
||||
showLoadingModal(context);
|
||||
if (context.mounted) showLoadingModal(context);
|
||||
final userInfo = ref.read(userInfoProvider);
|
||||
final client = ref.read(apiClientProvider);
|
||||
await client.post(
|
||||
|
@ -6,7 +6,6 @@ import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:island/models/chat.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/route.gr.dart';
|
||||
@ -349,9 +348,17 @@ class ChatDetailScreen extends HookConsumerWidget {
|
||||
leading: const Icon(Icons.timer),
|
||||
trailing: const Icon(Symbols.chevron_right),
|
||||
title: const Text('chatBreak').tr(),
|
||||
subtitle: identity!.breakUntil != null && identity.breakUntil!.isAfter(DateTime.now())
|
||||
? Text(DateFormat('yyyy-MM-dd HH:mm').format(identity.breakUntil!))
|
||||
: const Text('chatBreakNone').tr(),
|
||||
subtitle:
|
||||
identity.breakUntil != null &&
|
||||
identity.breakUntil!.isAfter(
|
||||
DateTime.now(),
|
||||
)
|
||||
? Text(
|
||||
DateFormat(
|
||||
'yyyy-MM-dd HH:mm',
|
||||
).format(identity.breakUntil!),
|
||||
)
|
||||
: const Text('chatBreakNone').tr(),
|
||||
onTap: () => showChatBreakDialog(),
|
||||
),
|
||||
],
|
||||
|
@ -7,7 +7,6 @@ import 'package:island/models/activity.dart';
|
||||
import 'package:island/pods/userinfo.dart';
|
||||
import 'package:island/route.gr.dart';
|
||||
import 'package:island/services/responsive.dart';
|
||||
import 'package:island/widgets/account/status.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/models/post.dart';
|
||||
import 'package:island/widgets/check_in.dart';
|
||||
|
Reference in New Issue
Block a user