From 278e93ddeb7138f3d1f4392240bf06e3369756f4 Mon Sep 17 00:00:00 2001 From: psavarmattas Date: Fri, 14 Aug 2026 16:14:33 +0100 Subject: [PATCH] fix(reader): tie viewer avatars to the Viewer Insights toggle Turning off Viewer Insights didn't hide the avatar stack until the view was torn down and rebuilt - that data belongs to the insights feature, so gate it on isInsightsEnabled directly instead of only on whether any viewers loaded. --- Outpost/Features/Collections/DocumentReaderView.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Outpost/Features/Collections/DocumentReaderView.swift b/Outpost/Features/Collections/DocumentReaderView.swift index 4b6c6d5..03d88ea 100644 --- a/Outpost/Features/Collections/DocumentReaderView.swift +++ b/Outpost/Features/Collections/DocumentReaderView.swift @@ -227,7 +227,10 @@ struct DocumentReaderView: View { @ViewBuilder private var viewerAvatars: some View { - if !viewModel.viewers.isEmpty { + // Tied to the Viewer Insights toggle — that's the feature this data + // belongs to, so turning it off should hide the avatars immediately + // rather than leaving them showing until the view reloads. + if viewModel.isInsightsEnabled == true, !viewModel.viewers.isEmpty { HStack(spacing: -6) { ForEach(viewModel.viewers.prefix(5)) { viewer in AvatarBadge(