Skip to content

fix(report): respect auto-zoom toggle for earthquake reports - #34

Merged
whes1015 merged 2 commits into
mainfrom
fix/report-auto-zoom
Oct 27, 2026
Merged

whes1015 merged 2 commits into
mainfrom
fix/report-auto-zoom

Conversation

@bamboo0403

Copy link
Copy Markdown
Member

Platform: all

Fix(zh-Hant): 地震報告會正確套用自動縮放設定,關閉後返回預設地圖範圍
Fix(en-US): earthquake reports now respect the auto-zoom setting and restore the default map view when disabled

Platform: all

Fix(zh-Hant): 地震報告會正確套用自動縮放設定,關閉後返回預設地圖範圍
Fix(en-US): earthquake reports now respect the auto-zoom setting and restore the default map view when disabled
@bamboo0403
bamboo0403 marked this pull request as ready for review October 15, 2026 06:39
@bamboo0403
bamboo0403 requested a review from whes1015 October 15, 2026 06:39
lowrt
lowrt previously approved these changes Oct 15, 2026
whes1015
whes1015 previously approved these changes Oct 26, 2026

@whes1015 whes1015 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看過 diff,方向正確:fitReport() 在自動縮放關閉時直接 return,focus 的設定變更也會把視角帶回台灣預設範圍,關閉→開啟兩種方向都補到了。2 個檔案、+24/−2,沒動到其他行為。

一個小建議(不擋合併):report.ts 那個 onConfigUpdated 少了 isAutoFocusLocked() 的檢查。這個檔其他呼叫 fitReport() 的地方(第 224 行)都有先擋手動鎖定,只有新加的這條沒有,所以使用者自己拖過地圖(鎖定中)再改音量或 TTS,地圖會被拉回地震報告。之後如果要收緊,加上 if (isAutoFocusLocked()) return; 或只比較 graphics-block-auto-zoom 這個鍵有沒有變就好。

@whes1015 whes1015 closed this Oct 26, 2026
@whes1015 whes1015 reopened this Oct 26, 2026
Platform: all

Fix(zh-Hant): 調整音量或其他設定時,地圖不會再被拉回地震報告
Fix(en-US): changing the volume or any other setting no longer pulls the map back to the earthquake report
@whes1015
whes1015 dismissed stale reviews from lowrt and themself via 2e33f4d October 26, 2026 23:06
@pull-request-size pull-request-size Bot added size/M and removed size/S labels Oct 26, 2026

@whes1015 whes1015 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI 全過(14 項),第二個 commit 只收斂 onConfigUpdated 的觸發條件,行為與 focus.ts 一致,可以合。

@whes1015
whes1015 merged commit 1672c5e into main Oct 27, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants