From 74e26ec36fdff12abfba0719b402f0ebfa3ff5f5 Mon Sep 17 00:00:00 2001 From: Yusuf Suleman Date: Fri, 3 Apr 2026 21:00:34 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20Reader=20stuck=20on=20loading=20?= =?UTF-8?q?=E2=80=94=20guard=20checked=20isLoading=20which=20was=20true?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit loadInitial() had guard !isLoading but isLoading defaults to true, so it returned immediately without loading. Replaced with hasLoadedOnce flag to prevent double-loading without blocking the first call. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../Features/Reader/ViewModels/ReaderViewModel.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ios/Platform/Platform/Features/Reader/ViewModels/ReaderViewModel.swift b/ios/Platform/Platform/Features/Reader/ViewModels/ReaderViewModel.swift index a4a07e7..dd102aa 100644 --- a/ios/Platform/Platform/Features/Reader/ViewModels/ReaderViewModel.swift +++ b/ios/Platform/Platform/Features/Reader/ViewModels/ReaderViewModel.swift @@ -41,8 +41,11 @@ final class ReaderViewModel { // MARK: - Load + private var hasLoadedOnce = false + func loadInitial() async { - guard !isLoading else { return } + guard !hasLoadedOnce else { return } + hasLoadedOnce = true isLoading = true error = nil