diff --git a/FlowCrypt/Controllers/Inbox/InboxViewController+TableView.swift b/FlowCrypt/Controllers/Inbox/InboxViewController+TableView.swift index 7f582b11e..68537f8b0 100644 --- a/FlowCrypt/Controllers/Inbox/InboxViewController+TableView.swift +++ b/FlowCrypt/Controllers/Inbox/InboxViewController+TableView.swift @@ -402,6 +402,10 @@ extension InboxViewController { hideSpinner() guard let indexToUpdate = getUpdatedIndex(for: inboxItem) else { + // Just reload data when index was not found in rare cases. + // https://github.com/FlowCrypt/flowcrypt-ios/issues/2366 + state = .refresh + handleBeginFetching(nil) return } diff --git a/FlowCrypt/Controllers/Inbox/InboxViewController.swift b/FlowCrypt/Controllers/Inbox/InboxViewController.swift index 555bed987..5c9e8cc04 100644 --- a/FlowCrypt/Controllers/Inbox/InboxViewController.swift +++ b/FlowCrypt/Controllers/Inbox/InboxViewController.swift @@ -316,7 +316,7 @@ extension InboxViewController { handleBeginFetching(context) } - private func handleBeginFetching(_ context: ASBatchContext?) { + func handleBeginFetching(_ context: ASBatchContext?) { switch state { case .idle: fetchAndRenderEmails(context)