diff --git a/src/app.cpp b/src/app.cpp index 4230117..6e985a6 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -1168,8 +1168,14 @@ void App::update() } else if (walletDataPage && shouldRefreshRecentTransactions()) { refreshRecentTransactionData(); } - // 0-conf chat: the normal harvest above only re-scans on a new block, so also do a light - // mempool scan of the chat address every cycle to surface messages before confirmation. + } + // 0-conf chat: a DEDICATED ~2.5s mempool scan of the chat address, independent of the page's + // (slower, 10–15s) Transactions cadence — so incoming messages surface in a few seconds. The + // normal harvest only re-scans on a new block. Self-gated (no-op without a chat identity / + // connection / on lite); the in-flight guard keeps overlapping RPCs from stacking. + chat_fast_scan_accum_ += ImGui::GetIO().DeltaTime; + if (chat_fast_scan_accum_ >= 2.5f) { + chat_fast_scan_accum_ = 0.0f; fastScanChatMemos(); } if (network_refresh_.consumeDue(RefreshTimer::Addresses)) { diff --git a/src/app.h b/src/app.h index f597db3..1140383 100644 --- a/src/app.h +++ b/src/app.h @@ -735,6 +735,7 @@ private: // (they still un-hide via the normal confirmed harvest). Self-gated; no-op without a chat identity. void fastScanChatMemos(); bool chat_fast_scan_in_flight_ = false; // guard against overlapping fast-scan RPCs + float chat_fast_scan_accum_ = 0.0f; // seconds since the last fast-scan (dedicated ~2.5s poll) // Lite first-run welcome prompt: dismissed for the session once the user picks an action. bool lite_firstrun_dismissed_ = false; // Lite send-time unlock: set to show the unlock modal when a spend is attempted while locked.