diff --git a/NucleicRemote/NucleicRemote/Views/SessionsView.swift b/NucleicRemote/NucleicRemote/Views/SessionsView.swift index 22fb067..9f515fd 100644 --- a/NucleicRemote/NucleicRemote/Views/SessionsView.swift +++ b/NucleicRemote/NucleicRemote/Views/SessionsView.swift @@ -6,8 +6,13 @@ import NucleicProtocol struct SessionsView: View { @EnvironmentObject var store: RemoteStore @State private var showArchived = false + @State private var showNewChat = false @State private var path = NavigationPath() + /// The floating New-chat button only makes sense when this device can control a Mac and there's + /// at least one project to start a chat in; otherwise the composer it opens would be inert. + private var canStartChat: Bool { store.canControl && !store.dashboard.projects.isEmpty } + private var grouped: [(title: String, rows: [WireSessionSummary])] { let pool = (showArchived ? store.sessions : store.liveSessions) .sorted(by: StatusStyle.attentionThenRecency)