claude refactorings, flutter best practices, platform dependent changes, general cleanup

This commit is contained in:
2026-05-06 11:58:50 +02:00
parent 4b1d4379a0
commit 72ebe6f7e7
278 changed files with 1804 additions and 1041 deletions
+1 -27
View File
@@ -6,36 +6,10 @@ import '../widget/debug/json_viewer.dart';
import 'notification_tasks.dart';
class NotificationController {
// Notification display is handled by the Firebase SDK using server-generated payloads.
@pragma('vm:entry-point')
static Future<void> onBackgroundMessageHandler(RemoteMessage message) async {
NotificationTasks.updateBadgeCount(message);
return; // Displaying the notification is curently done via the Firebase SDK itself. The Message is server-generated.
//
// await Firebase.initializeApp();
// AccountData().waitForPopulation().then((value) {
// log("User account status: $value");
// if(value) {
// GetRoom(
// GetRoomParams(
// includeStatus: false,
// ),
// ).run().then((value) {
// var messageCount = value.data.map((e) => e.unreadMessages).reduce((a, b) => a + b);
// var chatCount = value.data.where((e) => e.unreadMessages > 0).length;
// var people = value.data.where((e) => e.unreadMessages > 0).map((e) => e.displayName.split(" ")[0]);
//
// final NotificationService service = NotificationService();
// service.initializeNotifications().then((value) {
// service.showNotification(
// title: "Du hast $messageCount ungelesene Nachrichten!",
// body: "In $chatCount Chats, von ${people.join(", ")}",
// badgeCount: messageCount,
// );
// });
// });
// }
// });
}
static Future<void> onForegroundMessageHandler(RemoteMessage message, BuildContext context) async {