퀘스트 완료 햅틱 · HOME 행성 반응 · Push·라이브 띠 중복 제어 · 알림함 위계 · Push 탭 화면 이동
This commit is contained in:
@@ -14,6 +14,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
import '../../core/format.dart';
|
||||
import '../../core/push/push_messaging.dart' show liveTickerKey;
|
||||
import '../../core/i18n/app_locale.dart';
|
||||
import '../../core/theme/tokens.dart';
|
||||
import '../../core/ui/sheet_route.dart';
|
||||
@@ -43,6 +44,7 @@ import '../notification/notification_screen.dart';
|
||||
import '../quest/quest_data.dart' show QuestRepository;
|
||||
import '../quest/quest_list_screen.dart';
|
||||
import '../quest/quest_detail_screen.dart';
|
||||
import '../quest/quest_reward_screen.dart' show questPlanetReaction;
|
||||
import 'home_repository_firestore.dart' show kstDayKey;
|
||||
import 'widgets/quest_row.dart';
|
||||
import 'widgets/briefing_share.dart';
|
||||
@@ -125,10 +127,14 @@ class _HomeScreenState extends State<HomeScreen> with WidgetsBindingObserver {
|
||||
|
||||
void _onZapChanged() => setState(() {});
|
||||
|
||||
/// 퀘스트 보상 확정 뒤 HOME 으로 돌아오면 행성이 반응한다(v1.5 4장).
|
||||
void _questReaction() => _zap?.react();
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
WidgetsBinding.instance.removeObserver(this);
|
||||
homeRefreshSignal.removeListener(_refresh);
|
||||
questPlanetReaction.removeListener(_questReaction);
|
||||
_zap?.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
@@ -143,6 +149,7 @@ class _HomeScreenState extends State<HomeScreen> with WidgetsBindingObserver {
|
||||
super.initState();
|
||||
WidgetsBinding.instance.addObserver(this);
|
||||
homeRefreshSignal.addListener(_refresh);
|
||||
questPlanetReaction.addListener(_questReaction);
|
||||
_snapshot = widget.repository.load();
|
||||
if (widget.galaxyRepository case final repository?) {
|
||||
_galaxy = repository.load();
|
||||
@@ -292,6 +299,11 @@ class _LiveTickerSlot extends StatelessWidget {
|
||||
now: DateTime.now(),
|
||||
fallback: fallback,
|
||||
);
|
||||
// 앱 안 Push 중복 제어용 — 이 띠가 보이는 동안만 적는다(위에 화면이 덮이면 지운다).
|
||||
liveTickerShowing =
|
||||
line?.push == null || !(ModalRoute.isCurrentOf(context) ?? true)
|
||||
? null
|
||||
: liveTickerKey(line!.push!, fandomId);
|
||||
if (line == null) return const SizedBox.shrink();
|
||||
final hero = line.hero && onHero != null;
|
||||
return LiveTicker(
|
||||
|
||||
@@ -275,6 +275,7 @@ class _HomeHeroState extends State<HomeHero> {
|
||||
child: IgnorePointer(
|
||||
child: ZapFeedback(
|
||||
fandomName: widget.growth.fandomName,
|
||||
quest: zap.questReaction,
|
||||
touchSerial: zap.touchSerial,
|
||||
pending: zap.pending > 0 || zap.sending,
|
||||
result: zap.result,
|
||||
|
||||
Reference in New Issue
Block a user