퀘스트 완료 햅틱 · HOME 행성 반응 · Push·라이브 띠 중복 제어 · 알림함 위계 · Push 탭 화면 이동

This commit is contained in:
Sn-Kinos
2026-10-08 15:48:56 +09:00
parent 0b95454b28
commit 93150a0d5b
28 changed files with 619 additions and 52 deletions
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import '../../core/data/backend.dart';
import '../../core/i18n/app_locale.dart';
import '../../core/push/push_messaging.dart' show PushTier, pushTierOf;
/// 알림함이 그리는 값과 그 출처 — 화면 대조 원장 F0 · Figma `229:11265`.
///
@@ -85,6 +86,8 @@ class AppNotification {
this.read = false,
this.source,
this.targetPath,
this.eventType,
this.phase = '',
});
final String id;
@@ -104,6 +107,22 @@ class AppNotification {
final String? targetPath;
String? get target => kind.navigable ? targetPath : null;
/// 서버 문서의 `eventType` 원문. 없으면(표본) [kind] 로 읽는다.
final String? eventType;
/// 이클립스 항목의 단계 — `start` · `defended`.
final String phase;
/// 원장 C-78 단계 — 앱 안 Push 와 같은 표([pushTierOf]). 알림함은 이 단계로 시각 위계를 준다(v1.5 8장).
PushTier get tier => pushTierOf(
eventType ??
switch (kind) {
NotificationKind.itemUsed => 'item_used',
_ => kind.name,
},
phase: phase,
);
}
/// 날짜 머리글. 명세 — *오늘 및 어제를 제외한 과거는 yyyy.mm.dd 로 표시*.
@@ -231,6 +250,8 @@ class FirestoreNotificationRepository implements NotificationRepository {
title: doc.data().strOr('title', appL10n.homeNotificationsTooltip),
at: doc.data().dateOr('createdAt', _epoch),
read: doc.data().boolOr('read'),
eventType: doc.data().strOr('eventType'),
phase: doc.data().strOr('phase'),
// 서버가 아직 쓰지 않는 필드다. 비면 종류 이름으로 물러난다.
source: switch (doc.data().strOr('source')) {
'' => null,