android: add offline-first chat history reading and cache fallback
Some checks are pending
CI / test (push) Has started running

This commit is contained in:
Codex
2026-03-09 15:26:11 +03:00
parent 16c21d1bb7
commit 89755394f7
7 changed files with 45 additions and 9 deletions

View File

@@ -338,3 +338,8 @@
- Added shared API error mapper (`ApiErrorMapper`) with mode-aware mapping (`DEFAULT`, `LOGIN`).
- Switched auth/chat/message/media repositories to a single `Throwable -> AppError` mapping source.
- Kept login-specific invalid-credentials mapping while standardizing unauthorized/server/network handling for other API calls.
### Step 57 - Offline-first message history reading
- Added paged local history reading path by introducing configurable message observe limit (`observeMessages(chatId, limit)`).
- Updated chat screen loading strategy to expand local Room-backed history first when loading older messages.
- Added network-failure fallback in message sync/load-more: if network is unavailable but local cache exists, chat remains readable without blocking error.