Merge branch 'claude/awesome-golick-007e7d': message unread badges + OS notifications

# Conflicts:
#	apps/app_seeds/lib/di/injector.dart
#	apps/app_seeds/lib/i18n/ast.i18n.json
#	apps/app_seeds/lib/i18n/en.i18n.json
#	apps/app_seeds/lib/i18n/es.i18n.json
#	apps/app_seeds/lib/i18n/pt.i18n.json
#	apps/app_seeds/lib/i18n/strings.g.dart
#	apps/app_seeds/lib/i18n/strings_ast.g.dart
#	apps/app_seeds/lib/i18n/strings_en.g.dart
#	apps/app_seeds/lib/i18n/strings_es.g.dart
#	apps/app_seeds/lib/i18n/strings_pt.g.dart
#	apps/app_seeds/lib/ui/chat_screen.dart
This commit is contained in:
vjrj 2026-07-10 21:15:59 +02:00
commit 48db8fa7c8
27 changed files with 1238 additions and 114 deletions

View file

@ -13,6 +13,7 @@ import 'services/coarse_location.dart';
import 'services/inbox_service.dart';
import 'services/locale_store.dart';
import 'services/message_store.dart';
import 'services/notification_service.dart';
import 'services/offer_outbox.dart';
import 'services/onboarding_store.dart';
import 'services/profile_cache.dart';
@ -54,6 +55,12 @@ class _BootstrapState extends State<Bootstrap> {
final onboarding = getIt<OnboardingStore>();
final inbox =
getIt.isRegistered<InboxService>() ? getIt<InboxService>() : null;
final notifications = getIt.isRegistered<NotificationService>()
? getIt<NotificationService>()
: null;
// Ask for notification permission and set up the OS channel (no-op on
// unsupported platforms). Done before the inbox starts listening.
if (notifications != null) await notifications.initialize();
// Listen for incoming private messages app-wide (foreground) so they arrive
// and fill the inbox even before their chat is opened.
if (inbox != null) unawaited(inbox.start());
@ -74,6 +81,7 @@ class _BootstrapState extends State<Bootstrap> {
trustReferents: getIt<TrustReferents>(),
wotSettings: getIt<WotSettings>(),
inbox: inbox,
notifications: notifications,
showIntro: !await onboarding.introSeen(),
autoBackup: getIt.isRegistered<AutoBackupService>()
? getIt<AutoBackupService>()