Build chat panes through one content builder
Phase 2.2 of docs/plans/floating-windows.md: buildChatPaneContent wraps a conversation in the scopes it needs and keys it by the runtime, so the tiling and (next) a floating window build the same subtree. The tiling uses it; behaviour is unchanged.
This commit is contained in:
@@ -14,12 +14,7 @@ mixin _ChatScreenWorkspace on State<ChatScreen> {
|
||||
ChatFloatFrames get _floatFrames;
|
||||
void _bindFloat(ChatFloatStore store, Future<void> restored);
|
||||
void _unbindFloat();
|
||||
Widget _thread(
|
||||
String selected,
|
||||
VoidCallback onBack, {
|
||||
ChatWorkspacePane? pane,
|
||||
BuildContext? paneContext,
|
||||
});
|
||||
Widget _thread(ChatWorkspacePane pane);
|
||||
|
||||
ChatSidebarMode _sidebarMode = ChatSidebarMode.expanded;
|
||||
void _setSidebarMode(ChatSidebarMode mode) {
|
||||
@@ -390,16 +385,9 @@ mixin _ChatScreenWorkspace on State<ChatScreen> {
|
||||
// active pane the others fade theirs.
|
||||
child: ChatPaneActivity(
|
||||
inactive: _workspace.paneCount > 1 && !active,
|
||||
child: DetailPane(
|
||||
child: KeyedSubtree(
|
||||
key: ValueKey('chat-pane-detail-${pane.id}'),
|
||||
destination: AppDestination.chat,
|
||||
implyBack: false,
|
||||
builder: (context) => _thread(
|
||||
pane.sessionId,
|
||||
_back,
|
||||
pane: pane,
|
||||
paneContext: context,
|
||||
),
|
||||
child: _thread(pane),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user