Repository navigation
TigerDuck Android v1.4.2
v1.4.2 加入了一些新功能 — 引入手錶圖書館 QR、跨畫面的「衝堂」課程渲染、每節教室解析、課程詳情彈窗改版,以及大量手錶端與 Widget 的 UI 與 Apple 版本 同步。版本同時內含一個對應 v1.4.1 → v1.4.2 升級的崩潰熱修 — 與 v1.4.0 → v1.4.1 同形態的 Gson Unsafe 非 null 欄位陷阱再度出現,已透過放寬欄位可為 null + 取出點 coalesce 兩道防線解決。另外,此版本也修正了一堂課在不同時段教室不同卻顯示相同教室的錯誤。
v1.4.2 is a feature release — introducing the Library QR on the watch, conflicting-class (衝堂) rendering across every schedule surface, per-period classroom resolution, a redesigned course-detail popup, plus a large batch of Wear OS / widget UX changes synced with Apple version. It also ships a hotfix for the v1.4.1 → v1.4.2 upgrade path — the same Gson-Unsafe-vs-non-null-field trap from v1.4.0 → v1.4.1 reappeared on a new field and is now defused with both a nullable model field and a coalesce at the wire boundary. Additionally, this version also fixed the issue where all the courses have same classroom but they should have separate ones.
注意 / Notes:
- 從 v1.3.x 或 v1.4.1 升級的使用者:首次開啟後課表會立即從網路重新同步;無需手動清除資料或重新登入。
Users upgrading from v1.3.x or v1.4.1: the course list will re-sync from network on first launch; no manual data clear or re-login required. - 不同安裝渠道 (APK, F-Droid, Play Store) 由於 Sign Key 不同,將無法互相更新。
Different distribution channels (APK / F-Droid / Play Store) use different signing keys and cannot upgrade across each other. - 由於 F-Droid 應用程式商店規定不能使用 Firebase 相關服務,F-Droid 版本將無法獲得即時公告推送通知。
Due to Firebase related services not being usable in apps published on F-Droid, the F-Droid flavor will not receive push notifications for Announcements. - 由於 F-Droid 應用程式商店規定不能使用 GMS 套件,F-Droid 版本將不支援 Wear OS。
Due to GMS package not being usable in apps published on F-Droid, the F-Droid flavor will not have Wear OS support.
✨ 新功能 / New Features
⌚ 手錶圖書館 QR / Library QR on Watch
- 手錶新增 Library QR 頁 — 手機端推送圖書館憑證後,手錶可直接顯示圖書館入館 QR Code;手錶端與手機端皆支援「全螢幕模式 + 強制最高亮度」掃碼體驗
Library QR page on the watch — Once the phone publishes library credentials, the watch can render the entry QR directly; both surfaces support a fullscreen + force-max-brightness scan mode. - 獨立 QR Padding 設定 + 邊框預覽 — 手錶端 QR 邊距可獨立於手機端調整,設定畫面以角框預覽顯示實際留白範圍
Independent QR padding setting with corner-bracket preview — Watch QR padding can now be tuned independently of the phone; the setting screen shows real-time corner brackets that mirror the actual whitespace. - 全螢幕 QR 使用 padding 邊界 — 修正手錶全螢幕掃碼畫面忽略 padding 設定的問題
Fullscreen QR respects padding boundary — Fixed the watch fullscreen scan view ignoring the padding setting. - 手錶頁面指示器閒置 1.5 秒自動隱藏 — 避免遮擋 QR / 課表內容
Pager indicator auto-hides after 1.5s idle — Stops the indicator dots from covering QR / schedule content.
📚 衝堂課程跨畫面渲染 / Conflicting Class (衝堂) Rendering Everywhere
- 課表畫面 3+ 衝堂課同時顯示 — 過去三門以上衝堂的時段會把其中一門默默丟掉,現在會完整排列;圖示與顏色維持原本配置
Class-table renders 3+ chained 衝堂 courses — Previously, a slot with three or more conflicting classes silently dropped one; all are now laid out side-by-side without losing data. - 週網格小工具同樣支援 3+ 衝堂 — 與課表畫面行為一致
Week-grid widget supports 3+ chained 衝堂 — Matches the in-app class table. - 首頁時間軸:衝堂課堆疊為兩條 lane — 多門同時段課程在橫向時間軸上以分層堆疊呈現,去除 lane 間隙讓顏色直接相連
Home time-slider stacks 衝堂 slots into two lanes — Multiple parallel classes are stacked on the horizontal timeline with the inter-lane gap removed so the colours sit flush. - 首頁滑桿 InClass 模式展開所有衝堂時段 — 點擊任一節次會帶出該節次對應的教室,並支援拆日 (split-day) 場景
Home slider exposes every 衝堂 slot in InClass mode — Tapping any slot pulls up the correct room for that period, including split-day scenarios. - 首頁滑桿彈窗依據點選的時段顯示對應教室
Home slider popup respects the tapped slot's room.
🏫 每節教室解析 / Per-Period Classroom Resolution
- 以 (weekday, period) 為單位解析教室 — 一門課若不同時段不同教室,整個 App 各處(課表、時間軸、滑桿、彈窗、Widget)皆會顯示該時段對應的實際教室
Resolve classroom per (weekday, period) — When a single course meets in different rooms across the week, every surface in the app (class table, timeline, slider, popup, widgets) now shows the correct room for that specific period. - 支援 relabel-aware 滑桿 +
、分隔教室並去除重複
Relabel-aware slider +、-separated room dedup — Cleans up redundant rooms in the slider when relabelled.
📋 課程詳情彈窗改版 / Course Detail Popup Redesign
- 課表課程詳情彈窗重新設計 + 一鍵在 Moodle 開啟 — 詳情彈窗版面重新編排,並新增可直接跳轉至 Moodle 對應課程的按鈕
Class-table course detail popup redesign + open-in-Moodle action — The detail sheet has been reorganized and gains a one-tap action to jump straight to the course in Moodle.
⌚ 手錶其他改進 / Other Watch Improvements
- NowNext + Today 畫面同步 Apple Version 的 Apple Watch 行為 — 手錶端對齊 Apple Version 的 Apple Watch 表現
NowNext + Today UI synced with Apple Watch behavior. - 手錶設定頁顯示已登入帳號 / 上次同步 / 版本
Watch settings now shows signed-in account, last-sync time, and version. - 上次同步時間每分鐘自動更新,不再出現
0 h ago— 改回顯示分鐘級數字
Last-sync row refreshes each minute,0 h agois gone — Uses minute-level numerals now. watch_*在地化 keys — 手錶端不再借用手機端字串資源,使用獨立的 51 語系watch_*keys(包含watch_just_now、minutes_ago等)
watch_*localization keys — The watch no longer borrows phone strings; uses its own 51-localewatch_*keys (includingwatch_just_now,minutes_ago, etc.).- 依 App 語系顯示上次同步時間(使用
stringResource,不再硬編英文)
Last-sync age now follows the app locale (usesstringResourceinstead of hard-coded English). - 設定列 8dp 統一間距 — 視覺更整齊
Settings rows use uniform 8dp spacing. - 更新「今日無課」訊息
Updated "no classes today" message.
🔧 小工具同步 Apple Version / Widgets Synced with Apple Version
- NextClass + Today Widget 行為對齊 Apple Version — 計算邏輯、顯示順序與排版皆已與 Apple 版本一致
NextClass + Today widgets synced with Apple Version — Calculation logic, ordering, and layout now match the Apple version. - 多日後的下一堂課顯示星期幾,而非「明天」 — 若下一堂課不在明天,標籤會直接顯示對應的星期幾
Multi-day-out next class shows the weekday, not "Tomorrow" — If the next class isn't tomorrow, the label now shows the actual weekday.
📣 公告 / Bulletins
- 跨啟動保留科系篩選(可於設定關閉) — 啟動 App 時自動套用上次選的科系篩選
Remember department filter across launches (Settings toggle) — Re-applies the last-selected department filter on launch; can be disabled in Settings.
🏠 首頁 / Home
- 作業卡片顯示「課名 • 課號」 — 在作業標題下方多一行課程脈絡,方便辨識
Assignment cards show "course name • course no." — Adds a context line beneath each assignment title.
🆕 引導頁 / Onboarding
- 引導頁圖示與排版對齊 Apple Version
Onboarding icons and layout aligned with Apple Version - 空狀態:點鎖頭可跳到設定 + 使 NTUST 列閃爍 — 在尚未登入的空狀態畫面,點擊鎖頭圖示會直接打開設定並反白 NTUST 帳號列
Empty state: tap the lock icon to jump to Settings + flash the NTUST row — When unauthenticated, tapping the lock takes you straight to Settings with the NTUST row pulsing. - 移除舊版「選擇功能」頁面 — 已棄用的 onboarding step 一併拿掉
Dropped the dead "choose features" onboarding page.
⚙️ 設定 / Settings
- 設定主頁直接顯示圖書館開關 — 圖書館功能開關移至設定主頁,不再藏在子層
Library toggle surfaced on the main Settings page. - 設定頁頂端新增震動馬達品質警告
Vibration motor-quality warning blurb added to the top of Settings.
➕ 加課搜尋 / Add-Course Search
- 輸入第 1 個字即開始搜尋 — 從 2 字觸發降至 1 字,輸入更短的關鍵字也能立即看到結果
Search triggers from the 1st character — Lowered from 2 to 1; short queries surface results immediately.
🐛 修正 / Fixes
🚨 v1.4.1 升級崩潰熱修 / v1.4.1 Upgrade NPE Hotfix
Course.classroomMapJson改為可為 null — 在「每節教室」開發過程中新增的classroomMapJson: String = "{}"是非 null 預設欄位,但 Gson 2.x 透過 Unsafe 繞過 Kotlin 主建構子,預設值不會生效;v1.4.1 / v1.3.x 寫入的快取沒有這個鍵,反序列化後欄位為 null,TigerDuckApp.onCreate→wearBridge.publish()的Course → CourseDto映射就會踩到 Kotlin 的 non-null 參數檢查 — 與 v1.4.0 → v1.4.1 一模一樣的崩潰形態
Course.classroomMapJsonrelaxed to nullable — The per-period classroom feature addedclassroomMapJson: String = "{}"(non-null) toshared.Course. Gson 2.x bypasses Kotlin's primary constructor via Unsafe, so the"{}"default never runs; caches written by v1.4.1 / v1.3.x lack the key and deserialize the field as null, and the safety-netwearBridge.publish()inTigerDuckApp.onCreatethen trips Kotlin's non-null parameter check duringCourse → CourseDto— exactly the same crash shape that bit v1.4.0 → v1.4.1.WearScheduleBridge.toDto加上?: "{}"coalesce — 即使 Course 端因任何路徑取到 null,送往手錶的資料仍維持非 null
WearScheduleBridge.toDtocoalesces with?: "{}"— Even if a Course comes back from disk with a null field by any other path, the wire payload pushed to the watch stays non-null.- 後續為 AI 工具新增 upgrade-safe-persistence 防護規則 —
.claude/skills/upgrade-safe-persistence/記錄了「給跨升級持久化的 Gson 資料類加非 null 欄位 = 崩潰」這條規則,避免再次發生
Added upgrade-safe-persistence guardrails for AI tooling —.claude/skills/upgrade-safe-persistence/codifies the "non-null field with default on a Gson-persisted data class crashes across upgrades" rule so this pattern doesn't ship a third time.
📨 Moodle
- 作業標題與課程名稱解碼 HTML entities — 過去
&、'等會原樣顯示,現在會正確解析
Decode HTML entities in assignment titles and course names — Strings like&/'are now rendered correctly instead of shown verbatim. - 快取
idnumber → id對應表以避免帳號切換殘留 — 切換帳號後,前一個帳號的 Moodle 課程 id 不會再被誤用
Cacheidnumber → idmap so stale data can't survive account switch — After switching accounts, the previous account's Moodle course IDs are no longer mistakenly reused.
📢 通知 / Notifications
- 轉為「上課中」時取消「準備上課」橫幅 — 避免在課程開始後仍顯示準備提醒
Cancel the "class preparing" banner on transition to ongoing — Prevents the prep banner from lingering once the class has started.
⌚ 手錶憑證 / Watch Credentials
- 在設定登入 / 登出時推送憑證;手錶端憑證以加密方式儲存 — 不再依賴下次同步才更新手錶帳號狀態;手錶側憑證儲存加上加密層
Publish credentials on Settings login/logout + encrypt watch store — Watch account state no longer waits for the next sync; watch-side credential storage is now encrypted at rest.
📋 課表 / Classtable
- 修正課程名過長導致的崩潰,以及錯誤的「已加入」勾號
Fixed crash on overflowing course name + false "added" tick.
🛠️ 內部 / Internal
- 時間覆寫 (debug clock) 觸發 widgets + wear tile 立即重繪
Debug clock override now repaints widgets + wear tile immediately. - Developer 選單拆成 Time override + Notification 兩個子頁
Developer menu split into Time override + Notification subpages. - 更新 review 流程的 entity 解碼、checklist 重整與手錶憑證 TTL
review flow: entity decode + checklist refresh + watch credential TTL.
🔖 版本 / Version
- 手機:
versionCode19 → 20,versionName1.4.1 → 1.4.2
Phone:versionCode19 → 20,versionName1.4.1 → 1.4.2 - 手錶:
versionCode19 → 20,versionName1.4.1 → 1.4.2
Watch:versionCode19 → 20,versionName1.4.1 → 1.4.2
🔁 比較 / Diff
- 完整變更紀錄: v1.4.1...v1.4.2
Full changelog: v1.4.1...v1.4.2