diff --git a/bitchat/App/AppChromeModel.swift b/bitchat/App/AppChromeModel.swift index bee6ad08..bfaa3bb8 100644 --- a/bitchat/App/AppChromeModel.swift +++ b/bitchat/App/AppChromeModel.swift @@ -146,6 +146,11 @@ final class AppChromeModel: ObservableObject { isLocationChannelsSheetPresented = false isNoticesSheetPresented = false showingFingerprintFor = nil + // The people/conversation-list sheet is presented on this latch too + // (`ContentView.isPeopleSheetPresented`), and launch restore can raise + // it without anyone touching the screen — so it hides the outcome + // exactly like the sheets above unless it is cleared here. + showSidebar = false prepareForPanic?() onPanicWipe() diff --git a/bitchatTests/AppArchitectureTests.swift b/bitchatTests/AppArchitectureTests.swift index 747e737b..270ad76d 100644 --- a/bitchatTests/AppArchitectureTests.swift +++ b/bitchatTests/AppArchitectureTests.swift @@ -501,6 +501,11 @@ struct AppArchitectureTests { chromeModel.isLocationChannelsSheetPresented = true chromeModel.presentNotices() chromeModel.showFingerprint(for: PeerID(str: "peer-3")) + // The people/conversation-list sheet counts: ContentView presents it + // whenever `showSidebar || selectedPrivatePeerID != nil`, so a latch + // left set covers the root timeline exactly like the others. Launch + // restore (#1064) can raise it without the person touching anything. + chromeModel.showSidebar = true chromeModel.panicClearAllData() @@ -508,6 +513,7 @@ struct AppArchitectureTests { #expect(!chromeModel.isLocationChannelsSheetPresented) #expect(!chromeModel.isNoticesSheetPresented) #expect(chromeModel.showingFingerprintFor == nil) + #expect(!chromeModel.showSidebar) } @Test("Recent chats list direct conversations with people absent from the rosters")