slotIndex is a per-department index of non-empty intervals, not a time.
Merging all departments of a period by slotIndex and deriving the slot
time from the first inserted lesson produced shifted times (e.g. Meltsov
10:00 shown at 11:45) depending on sync order. Group by lesson start
minute instead so each department's real times are kept.
Add debug logging for teacher schedule sync/build and debounce teacher
search in picker.
Per-request GET success logs (39 long URLs per teacher sync) flood the
2MB logcat buffer together with system ZeroHung spam, drowning the real
kill reason (am_proc_died / lowmemorykiller). Log only non-2xx responses.
- Reduce sync parallelism 5 -> 2 to cap peak heap while bulk-fetching
all departments for a period
- Replace per-write rows (insert schedule/days/lessons separately) with a
single @Transaction replaceSchedule() so Room invalidates observers once
per department instead of ~4x each, cutting main-thread recompositions
and intermediate allocations during the 38-department sync
- Register AppDatabase.MIGRATION_3_4 so v3 databases upgrade without data loss
- Query teacher schedule periods by containment (weekStart<=x AND weekEnd>=x)
instead of exact weekStart, matching 2-week catalog windows
- Clip buildTeacherSchedule days to the requested week range
- Add weeksFor() to enumerate weeks of a catalog window for the UI selector
- Serialize syncPeriod body with a Mutex to protect the unique index
- Rethrow CancellationException before generic catch; version loadRevision
checks so stale observers/loads are cancelled
- Sync job tracking in PickerViewModel; keep loading true while empty
- Drop dead selectTeacher helper