diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/relayClient/reqCommand/account/nip59GiftWraps/AccountGiftWrapsHistoryEoseManager.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/relayClient/reqCommand/account/nip59GiftWraps/AccountGiftWrapsHistoryEoseManager.kt index 7e3986b7b3..8734fe3d20 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/relayClient/reqCommand/account/nip59GiftWraps/AccountGiftWrapsHistoryEoseManager.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/relayClient/reqCommand/account/nip59GiftWraps/AccountGiftWrapsHistoryEoseManager.kt @@ -328,7 +328,12 @@ class AccountGiftWrapsHistoryEoseManager( message: String, forFilters: List?, ) { + // Cannot-connect is also "no answer": count it toward give-up like a CLOSE, so a relay + // that's unreachable (down / blocked) doesn't keep exhaustion false forever — otherwise a + // cold, empty feed would retry it endlessly and stay on the spinner. Once it's given up, + // exhaustion can complete and the screen resolves (to the loaded rooms, or empty + retry). windowLoad.onRelaySettled(relay) + if (pager.onClosed(user.pubkeyHex, relay)) markExhaustedIfAllDone(user) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/rooms/datasource/ChatroomListNip04HistorySubAssembler.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/rooms/datasource/ChatroomListNip04HistorySubAssembler.kt index ff75a86c90..adf9cae42b 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/rooms/datasource/ChatroomListNip04HistorySubAssembler.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/rooms/datasource/ChatroomListNip04HistorySubAssembler.kt @@ -282,7 +282,11 @@ class ChatroomListNip04HistorySubAssembler( message: String, forFilters: List?, ) { + // Count cannot-connect toward give-up like a CLOSE, so an unreachable relay doesn't keep + // exhaustion false forever (otherwise a cold, empty feed retries it endlessly and stays on + // the spinner). Once given up, exhaustion completes and the screen resolves. windowLoad.onRelaySettled(relay) + if (pager.onClosed(user.pubkeyHex, relay)) markExhaustedIfAllDone(user) } }