aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app.js6
-rw-r--r--src/features/ark.js4
-rw-r--r--src/features/gifts.js2
3 files changed, 8 insertions, 4 deletions
diff --git a/src/app.js b/src/app.js
index 3fb985f..0772d42 100644
--- a/src/app.js
+++ b/src/app.js
@@ -534,7 +534,11 @@ wallet.subscribe(scheduleRender);
// buttons (and Android/system back) move between screens we've actually viewed.
// We snapshot only the navigation-relevant `ui` fields, so incidental re-renders
// (typing, polling, balance updates) don't create history entries.
-const NAV_FIELDS = ['screen', 'tab', 'txDetail', 'bump', 'giftMode', 'claimStep', 'chatOpen', 'msgView', 'msgCommunity', 'msgPeer', 'profilePk', 'settingsPage', 'nameEditOpen', 'noteThread', 'userSearch', 'zapSetup', 'hatShop'];
+// arkMoveDetail/arkExitDetail/giftDetail are the ark and gift rows' detail
+// views — most Spending payments open one of these, and leaving them out
+// meant the phone's native Back skipped past the history list entirely
+// (it landed on whatever tab minted the previous entry).
+const NAV_FIELDS = ['screen', 'tab', 'txDetail', 'arkMoveDetail', 'arkExitDetail', 'giftDetail', 'bump', 'giftMode', 'claimStep', 'chatOpen', 'msgView', 'msgCommunity', 'msgPeer', 'profilePk', 'settingsPage', 'nameEditOpen', 'noteThread', 'userSearch', 'zapSetup', 'hatShop'];
function navSnapshot() {
const s = {};
for (const f of NAV_FIELDS) s[f] = ui[f] ?? null;
diff --git a/src/features/ark.js b/src/features/ark.js
index bacf49e..ace0ea7 100644
--- a/src/features/ark.js
+++ b/src/features/ark.js
@@ -1006,7 +1006,7 @@ export function arkFeature(ctx) {
ui.arkExitDetail = null;
render();
} }, t('arkExitCancel')) : null,
- h('button', { class: 'btn-ghost btn-block', onClick: () => { ui.arkExitDetail = null; render(); } }, t('back')));
+ h('button', { class: 'btn-ghost btn-block', onClick: () => ctx.goBack(() => { ui.arkExitDetail = null; }) }, t('back')));
}
function arkMoveDetailView(m) {
@@ -1081,7 +1081,7 @@ export function arkFeature(ctx) {
h('a', { class: 'btn btn-sm', href: url, target: '_blank', rel: 'noopener', onClick: (e) => { e.preventDefault(); openExternal(url); } }, t('viewOnMempool'))))
: null,
m.to ? copyBtn(m.to, t('copyAddress')) : null,
- h('button', { class: 'btn-ghost btn-block', onClick: () => { ui.arkMoveDetail = null; render(); } }, t('back'))
+ h('button', { class: 'btn-ghost btn-block', onClick: () => ctx.goBack(() => { ui.arkMoveDetail = null; }) }, t('back'))
);
}
diff --git a/src/features/gifts.js b/src/features/gifts.js
index 3b094d1..a73bfe9 100644
--- a/src/features/gifts.js
+++ b/src/features/gifts.js
@@ -739,7 +739,7 @@ export function giftsFeature(ctx) {
const created = (wallet.loaded && (wallet.giftRecords()[g.id] || {}).created) || g.created;
const rec = g.claimed ? null : wallet.giftLink(g.id);
const line = (k, v) => h('div', { class: 'line' }, h('span', { class: 'k' }, k), h('span', { class: 'v' }, v));
- const back = () => { ui.giftDetail = null; ui.revokeId = null; render(); };
+ const back = () => { ui.revokeId = null; ctx.goBack(() => { ui.giftDetail = null; }); };
return h(
'div',
{ class: 'card col' },