From 521355626dcfc7833d86be355b4202aef249af92 Mon Sep 17 00:00:00 2001 From: sihoo Date: Tue, 29 Sep 2026 23:30:53 +0000 Subject: [PATCH] =?UTF-8?q?=ED=83=80=EC=9D=B4=EB=A8=B8=20=ED=99=94?= =?UTF-8?q?=EB=A9=B4=EC=9D=84=20=EB=82=98=EA=B0=88=20=EB=95=8C(=EC=95=B1?= =?UTF-8?q?=20=EC=95=88=EC=97=90=EC=84=9C=20=EC=9D=B4=EB=8F=99)=20?= =?UTF-8?q?=EA=B3=84=EC=86=8D=20=EB=8F=8C=EC=95=84=EA=B0=80=EB=8A=94=20?= =?UTF-8?q?=EC=A4=91=EC=9D=B4=EB=9D=BC=EA=B3=A0=20=EC=95=8C=EB=A6=BC=20?= =?UTF-8?q?=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 브라우저 탭 자체는 그대로 두고 앱 안에서 다른 화면으로 이동하면 AppLifecycleState가 안 바뀌어서 기존 "탭 이탈" 감지가 못 잡는 사각 지대였음. 화면 dispose 시점에 타이머가 running이면 직접 알림을 띄움. Co-Authored-By: Claude Sonnet 5 --- lib/ui/study_timer_screen.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/ui/study_timer_screen.dart b/lib/ui/study_timer_screen.dart index 12dcef9..5f7e7f2 100644 --- a/lib/ui/study_timer_screen.dart +++ b/lib/ui/study_timer_screen.dart @@ -77,6 +77,15 @@ class _StudyTimerScreenState extends State @override void dispose() { + // 🔔 브라우저 탭은 그대로 두고 앱 안에서 다른 화면으로 이동하는 경우(뒤로가기 등)는 + // AppLifecycleState가 안 바뀌어서 위쪽 감지 로직이 못 잡는다. 그래서 이 화면을 나갈 + // 때 타이머가 돌아가는 중이었다면 여기서 직접 알림을 띄워준다. + if (_controller.isRunning) { + showBrowserNotification( + '백품타 타이머가 계속 돌아가고 있어요', + '이 화면을 나가도 공부 시간은 계속 기록돼요.', + ); + } WidgetsBinding.instance.removeObserver(this); _awayTimer?.cancel(); _controller.dispose();