update docs

This commit is contained in:
2026-06-13 21:30:12 +05:00
parent 281864347e
commit a8cd22cbe1
51 changed files with 1830 additions and 469 deletions
+23 -35
View File
@@ -1,54 +1,42 @@
# Settings — Storage
Manages locally cached data and profile images.
Clears locally cached data.
---
## Fragment — `SettingsStorageFragment`
Displays an overview of locally stored data categories with clear actions for each.
A single **Clear All Caches** button (`SettingsStorageFragment.kt:44-49`). No per-category clear actions, no size readout.
---
## Stored Data Categories
## What gets cleared
| Category | Location | Description |
|---|---|---|
| Profile images | `filesDir/profile_images/` | BML and Fahipay profile photos stored by `ProfileImageStore` |
| Contact images | `filesDir/profile_images/` | Contact avatar photos |
| Transaction image cache | In-memory / HTTP cache | Merchant logos loaded in account history |
| Camera temp file | `cacheDir/profile_photo_tmp.jpg` | Temp file from camera capture; automatically overwritten on next camera use |
| Transfer receipts | Local database | Completed transfer records shown in Activities |
Tapping the button invokes `clearAllCaches()` (`SettingsStorageFragment.kt:62-72`), which clears each of:
| Cache | Backing store |
|---|---|
| `AccountCache` | Encrypted JSON file in `filesDir` |
| `ContactsCache` | Encrypted JSON file in `filesDir` |
| `FinancingCache` | Encrypted JSON file in `filesDir` |
| `ForeignLimitsCache` | Encrypted JSON file in `filesDir` |
| `RecentsCache` | Encrypted JSON file in `filesDir` |
| `CardsCache` | Encrypted JSON file in `filesDir` |
| `TransactionCache` | Per-account encrypted history files (`tx_<key>.json`) |
| `ContactImageCache` | Local contact avatar bitmaps |
It also resets the live `HomeViewModel` flows (`accounts`, `mibCards`, `financing`, `bmlLoanDetails`, `bmlLimits`, `contacts`, `contactCategories`) and triggers a refresh.
---
## Clear Actions
## What is **not** cleared
### Clear Profile Images
- Profile images stored by `ProfileImageStore` (`filesDir/profile_images/`) — BML and Fahipay avatars persist.
- Credentials / sessions in `CredentialStore`.
- Transfer receipts (Activities) — managed by `ReceiptStore`, persists across cache clears.
- Notification read-state in `NotificationsCache`.
Deletes all files in `filesDir/profile_images/` for BML and Fahipay profiles. MIB profile images are stored server-side and are not affected. After clearing, avatars fall back to the initials placeholder.
### Clear Contact Images
Deletes all contact profile images. Contact records are preserved.
### Clear All Caches
Clears:
- `cacheDir` contents (including camera temp file and HTTP response cache)
- In-memory image caches
Does **not** clear credentials, sessions, or transfer records.
### Clear Transfer History
Deletes all locally stored transfer receipt records from the database. This action is irreversible and requires a confirmation dialog.
---
## Storage Usage
The screen may show an approximate size for each category (calculated by summing file sizes in the respective directories).
To remove a login entirely (and the credentials behind it), use [Settings → Logins](14-settings.md).
---