Conversation
lowrt
approved these changes
Sep 10, 2026
bamboo0403
approved these changes
Sep 10, 2026
New(zh-Hant): 雷達回波右上角多了閃電選項,落雷和畫面上那一幀回波是同一時間 New(en-US): the radar echo can now overlay lightning, showing the strikes from the same time as the frame on screen
Fix(zh-Hant): 修正地震重播切到其他分頁後仍繼續抓取資料,要切回資料頁才會停 Fix(en-US): the earthquake replay now stops fetching when you leave the tab, instead of running on until you come back
Fix(zh-Hant): 修正離開地震重播時,若剛好有一次抓取還在進行會記錄一筆錯誤 Fix(en-US): leaving the earthquake replay while a fetch is in flight no longer logs an error
Platform: ios Fix(zh-Hant): 修正離開含地圖的頁面時會記錄一筆錯誤,並且白白重建一次地圖 Fix(en-US): leaving a page with a map no longer logs an error and rebuilds the map for nothing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
這個 PR 做了什麼
雷達回波多了同一幀時間的閃電圖層,另外修掉三個「離開頁面之後才發作」的缺陷:地震重播不會停、重播抓取撞上 dispose、以及離開含地圖的頁面時地圖被誤判成卡住。
相關 issue
怎麼驗
1/4 雷達閃電(
feat(map))落雷顏色是年紀:5 / 10 / 30 / 60 分鐘四段,紅、黃、綠、藍。
2/4 離開地震重播頁(
fix(eew),第一則)改動前要切回資料頁它才會停 —— 因為 go_router 的
StatefulShellRoute只是把離開的分支凍在IndexedStack裡,dispose不會被呼叫。新的ActiveWhileVisible就是拿來補這個缺口的,它和既有的RefreshOnAppear是一對:那個負責重新進入時抓一次,這個負責離開時停下來。3/4 重播抓取撞上 dispose(
fix(eew),第二則)在重播頁按返回,同時剛好有一次抓取在飛 —— 改動前 log 會多一筆
This widget has been unmounted, so the State no longer has a context。改動後不會。這一則和上一則刻意分開:一個是可見度閘門,一個是 closure 抓了
context,按返回鍵(沒有切分頁)也會踩到,兩件事各自獨立。4/4 地圖 resume 誤判(
fix(map),iOS)iOS 上離開任何含地圖的頁面,log 會出現
PlatformException(map_resume_timeout, ...),接著地圖被白白重建一次。原生端在回報這個逾時的時候帶了window欄位,window == false代表 view 根本不在畫面上 —— 那不是卡住,是正常離開。改動後這種情況直接忽略,不記錄也不重建。測試:
test/shared/navigation/active_while_visible_test.dart(新增 9 個)涵蓋離開/回來、暫停/恢復、以及沒有VisibleTabScope的情況;test/shared/map/base_map_tab_test.dart新增「view 不在 window 上就不重建」一條,既有的「確認過的原生 resume 失敗才重建」留著當對照組。tool/commit.sh全部 gate 在本機通過。檢查清單
tool/check/commits.sh origin/main..HEAD通過—— commit 訊息就是更新日誌,格式見 commit.md
mise exec -- flutter analyze與mise exec -- flutter test通過—— 走
tool/dev/analyze.sh、tool/dev/test.shAppLocalizations,沒有寫死—— 閃電選項的字串 12 個 locale 都補齊了
AppSpacing/AppRadius/AppMotion,深色模式看過,文字對比度可接受
—— 閃電是既有雷達選單裡多一列,沿用同一個 row 樣式,沒有新的視覺元素