Повторный вход в аккаунт, очистка кэша
This commit is contained in:
@@ -47,7 +47,7 @@ class _ChatsPageState extends State<ChatsPage> {
|
||||
body: BlocConsumer<ChatBloc, ChatState>(
|
||||
listener: (context, state) {
|
||||
state.whenOrNull(
|
||||
chatSelected: (chat, _) {
|
||||
chatSelected: (chat, _, __) {
|
||||
final authState = context.read<AuthBloc>().state;
|
||||
final userId = authState.maybeWhen(
|
||||
authenticated: (id) => id,
|
||||
@@ -72,9 +72,9 @@ class _ChatsPageState extends State<ChatsPage> {
|
||||
},
|
||||
builder: (context, state) {
|
||||
return state.maybeWhen(
|
||||
loading: () => const Center(child: CircularProgressIndicator()),
|
||||
chatsLoaded: (chats) => _buildChatList(chats, l10n),
|
||||
error: (message) => Center(child: Text('${l10n.error}: $message')),
|
||||
loading: (_) => const Center(child: CircularProgressIndicator()),
|
||||
chatsLoaded: (chats, _) => _buildChatList(chats, l10n),
|
||||
error: (message, _) => Center(child: Text('${l10n.error}: $message')),
|
||||
orElse: () => const Center(child: CircularProgressIndicator()),
|
||||
);
|
||||
},
|
||||
@@ -141,7 +141,7 @@ class _ChatsPageState extends State<ChatsPage> {
|
||||
children: [
|
||||
if (chat.lastMessageTime != null)
|
||||
Text(
|
||||
DateFormat.Hm().format(chat.lastMessageTime!),
|
||||
DateFormat.Hm().format(chat.lastMessageTime!.toLocal()),
|
||||
style: const TextStyle(fontSize: 12, color: Colors.grey),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
|
||||
Reference in New Issue
Block a user