improved performance and battery usage on older devices

This commit is contained in:
2026-09-25 23:58:08 +02:00
parent ed8e52f475
commit 56a497985b
70 changed files with 1631 additions and 621 deletions
+10 -1
View File
@@ -7,6 +7,8 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import '../push/push_message_handler.dart';
import '../routing/app_routes.dart';
import '../state/app/modules/chat/bloc/chat_bloc.dart';
import '../state/app/modules/chat_list/bloc/chat_list_bloc.dart';
import '../utils/debouncer.dart';
import '../widget/debug/debug_tile.dart';
import '../widget/debug/json_viewer.dart';
import '../widget/info_dialog.dart';
@@ -35,7 +37,14 @@ class NotificationController {
);
await NotificationTasks.refreshBadge();
if (!context.mounted) return;
NotificationTasks.updateProviders(context);
// A busy group chat delivers pushes in bursts; one silent refresh after
// the burst replaces a full room-list fetch per message.
final chatList = context.read<ChatListBloc>();
Debouncer.debounce(
'pushChatListRefresh',
const Duration(seconds: 1),
() => chatList.refresh(silent: true),
);
}
static Future<void> onAppOpenedByNotification(