From 259a95abdec170b7bb6def107b451dde1454293d Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 6 Nov 2026 23:31:43 -0700 Subject: Pull down to refresh works in the Android app, the Beta and an installed PWA. "Pull down to refresh isn't working for me in the apk" (Adam, 2026-11-06): measured on his Pixel, the same pull reloads a Chrome tab but not the app — Chrome turns its pull-to-refresh off whenever a page runs full screen, which the TWA (sticky-immersive since 1.14) always does, and a WebView or a standalone PWA has none at all. src/pull-refresh.js takes over where the page reports display-mode standalone or fullscreen, or runs in our WebView (window.CoinosHost), and switches the browser's off there (overscroll-behavior-y: contain) so the two never both fire; a browser tab keeps the browser's. A pull counts only at the top of the page, vertical (sideways swipes stay the tab navigation's), and not from inside something scrolled down (a chat, a picker) or over the page (dialogs, the media viewer, fields); damped like the browser's, a round arrow follows the finger and spins once the pull is far enough, and release reloads (through the network, as a refresh does). On the phone, the local build served into the app: a pull at the top reloads, one while scrolled down only scrolls, a short one does nothing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VMan6Ts5Tktega8VbLg31q --- src/app.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/app.js') diff --git a/src/app.js b/src/app.js index 5b57f37..33a47c1 100644 --- a/src/app.js +++ b/src/app.js @@ -21,6 +21,7 @@ import { STAGING } from './build-flags.js'; import { buildFeatures, loadDeferredFeatures } from './features/index.js'; import { cacheReady, cacheStore } from './cache-store.js'; import { t, LANGS, getLang, setLang, isRTL, loadLocale } from './i18n.js'; +import { initPullRefresh } from './pull-refresh.js'; import { rateNow, rateAt, refreshRates, haveRate, getCurrency, setCurrency, currencies, fmtFiat, fmtFiatBare } from './rates.js'; import { fmtBtc, @@ -7042,6 +7043,7 @@ loadLocale(getLang()).finally(async () => { _restorePending = false; if (!opened || !activeAccount()) render(); bootPhase('ui'); + initPullRefresh(); // the app and the Beta have no browser pull-to-refresh setTimeout(bootSettled, 8000); if (WAKE_PAYLOAD != null) { // Nothing opened — a locked vault, or no wallet on this device. There is -- cgit v1.2.3