claude refactor

This commit is contained in:
2026-05-04 13:54:39 +02:00
parent 9973f12733
commit 551c1bf1fa
125 changed files with 4484 additions and 2544 deletions
+8 -8
View File
@@ -1,26 +1,26 @@
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_app_badge/flutter_app_badge.dart';
import 'package:provider/provider.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import '../main.dart';
import '../model/chatList/chatListProps.dart';
import '../model/chatList/chatProps.dart';
import '../state/app/modules/app_modules.dart';
import '../state/app/modules/chat/bloc/chat_bloc.dart';
import '../state/app/modules/chatList/bloc/chat_list_bloc.dart';
class NotificationTasks {
static void updateBadgeCount(RemoteMessage notification) {
FlutterAppBadge.count(int.parse(notification.data['unreadCount'] ?? 0));
FlutterAppBadge.count(int.parse(notification.data['unreadCount'] ?? '0'));
}
static void updateProviders(BuildContext context) {
Provider.of<ChatListProps>(context, listen: false).run(renew: true);
Provider.of<ChatProps>(context, listen: false).run();
context.read<ChatListBloc>().refresh();
context.read<ChatBloc>().refresh();
}
static void navigateToTalk(BuildContext context) {
var talkTab = AppModule.getBottomBarModules(context).map((e) => e.module).toList().indexOf(Modules.talk);
if(talkTab == -1) return;
final talkTab = AppModule.getBottomBarModules(context).map((e) => e.module).toList().indexOf(Modules.talk);
if (talkTab == -1) return;
Main.bottomNavigator.jumpToTab(talkTab);
}
}