Повторный вход в аккаунт, очистка кэша

This commit is contained in:
Халимов Рустам
2026-05-15 00:10:34 +03:00
parent 0b013def2e
commit 40589dbb75
21 changed files with 1732 additions and 309 deletions
@@ -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),