The old refresh path called MibContactsClient.fetchContacts() per
profile, which greedily walked every page and stuffed the union into
the contacts cache in one shot. A user with several hundred or several
thousand MIB beneficiaries paid for N round-trips before the screen
could render, and the cache write encrypted the whole blob each time.
Introduces a paginator that streams contacts on demand:
* MibContactsClient.fetchContactsPage(session, start, count) — single
page; fetchContacts() now layers on top for callers that want all
pages.
* MibContactsPaginator — walks the user's MIB profiles serially under
the existing mibMutex, returning one page per nextPage() call.
Categories are accumulated across calls.
* HomeActivity.refreshContacts now requests just the first page
(default 30 contacts) per login. Subsequent pages arrive via
HomeActivity.loadMoreMibContacts(), which ContactsFragment fires
from a scroll listener when the user is within 5 rows of the end
of any tab. NEXT_PAGE_SIZE is 100 — matches the API's natural
page size.
* ContactsCache.appendContacts merges a new page into the cached
list (dedupe by benefNo) instead of overwriting. The first page
of a refresh still uses save() so deletions take effect.
* HomeViewModel exposes mibContactsLoading / mibContactsHasMore
so the fragment can show a loading footer (item_loading_footer)
on each contact tab while a page is in flight.
* ContactsAdapter grows a showLoadingFooter flag and a second view
type for the footer row.
Search remains client-side over the loaded set — results may be
partial until the user keeps scrolling. The MIB API supports
server-side search via the `search` parameter but wiring it in is a
separate change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Introduces a new attention row in the dashboard to display blocked funds and overdue financing. The row is conditionally visible based on the presence of blocked amounts or overdue totals. Updates the account display logic to show blocked amounts where applicable, ensuring users have a clear view of their financial status. Additionally, new string resources for "Blocked Funds" and "Overdue Financing" are added for localization.
BML CASA rows on the accounts list were showing currentBalance (the
working/ledger balance, which includes blocked funds). Every other
balance display in the app — transfer screen, contact picker, QR pay,
dashboard totals — uses availableBalance, so the same account was
showing a different figure depending on where you looked at it.
This switches the accounts list to availableBalance for consistency,
and adds a small muted "MVR X.XX blocked" line beneath the balance
when blocked > 0 so the blocked funds are still visible at a glance.
Only BML reports a non-zero blocked amount; MIB and Fahipay rows are
unaffected.
The per-account history page header is untouched — its three-column
Available / Balance / Blocked breakdown still works as before.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds applicationIdSuffix=.debug and versionNameSuffix=-debug so a
side-loaded debug build can be installed alongside the Play/release
build without conflicting on package id.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>