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

@ -12,6 +12,7 @@ import 'services/auto_backup_service.dart';
import 'services/coarse_location.dart';
import 'services/inbox_service.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';
@ -58,6 +59,7 @@ class TaneApp extends StatelessWidget {
this.trustReferents,
this.wotSettings,
this.inbox,
this.notifications,
this.showIntro = false,
this.autoBackup,
super.key,
@ -76,7 +78,12 @@ class TaneApp extends StatelessWidget {
trustReferents,
wotSettings,
inbox,
);
) {
// A tapped message notification opens that peer's chat. Wired here because
// the router only exists now; taps only happen while the app is foreground,
// so a live router reference is enough.
notifications?.onTapChat = (pubkey) => _router.push('/chat/$pubkey');
}
final VarietyRepository repository;
final SpeciesRepository species;
@ -111,6 +118,10 @@ class TaneApp extends StatelessWidget {
/// App-wide inbox listener; drives the messages list's live refresh.
final InboxService? inbox;
/// OS notifications for foreground messages; its tap handler is wired to the
/// router here. Null in tests / on platforms without notification support.
final NotificationService? notifications;
final bool showIntro;
/// Drives silent periodic backups off the app lifecycle. Null in widget tests