Keep chat workspace above Android navigation and use pane chat color
This commit is contained in:
@@ -243,34 +243,46 @@ mixin _ChatScreenWorkspace on State<ChatScreen> {
|
||||
onSelected: _openBelow,
|
||||
);
|
||||
|
||||
Widget _workspaceView() => ChatWorkspace(
|
||||
key: _workspaceKey,
|
||||
controller: _workspace,
|
||||
shortcutsEnabled: _workspaceVisible,
|
||||
singlePane: !showsListBesideDetail(context),
|
||||
mobilePeeks: !showsListBesideDetail(context),
|
||||
paneTitle: (pane) =>
|
||||
'${_rowFor(pane.sessionId)?['title'] ?? pane.sessionId}',
|
||||
onFocusPane: (pane) => _composerFocus.request(pane.sessionId),
|
||||
paneBuilder: (context, pane, active) => Semantics(
|
||||
selected: active,
|
||||
child: DecoratedBox(
|
||||
position: DecorationPosition.foreground,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: _workspace.paneCount > 1 && active
|
||||
? (chatControlsStyleOf(context) == ChatControlsStyle.cupertino
|
||||
? CupertinoTheme.of(context).primaryColor
|
||||
: Theme.of(context).colorScheme.primary)
|
||||
: Colors.transparent,
|
||||
Widget _workspaceView() => SafeArea(
|
||||
top: false,
|
||||
child: ChatWorkspace(
|
||||
key: _workspaceKey,
|
||||
controller: _workspace,
|
||||
shortcutsEnabled: _workspaceVisible,
|
||||
singlePane: !showsListBesideDetail(context),
|
||||
mobilePeeks: !showsListBesideDetail(context),
|
||||
paneTitle: (pane) =>
|
||||
'${_rowFor(pane.sessionId)?['title'] ?? pane.sessionId}',
|
||||
onFocusPane: (pane) => _composerFocus.request(pane.sessionId),
|
||||
paneBuilder: (context, pane, active) => Semantics(
|
||||
selected: active,
|
||||
child: DecoratedBox(
|
||||
position: DecorationPosition.foreground,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: _workspace.paneCount > 1 && active
|
||||
? chatColorShade(
|
||||
context,
|
||||
chatSessionColor(_rowFor(pane.sessionId)),
|
||||
) ??
|
||||
(chatControlsStyleOf(context) ==
|
||||
ChatControlsStyle.cupertino
|
||||
? CupertinoTheme.of(context).primaryColor
|
||||
: Theme.of(context).colorScheme.primary)
|
||||
: Colors.transparent,
|
||||
),
|
||||
),
|
||||
child: DetailPane(
|
||||
key: ValueKey('chat-pane-detail-${pane.id}'),
|
||||
destination: AppDestination.chat,
|
||||
implyBack: false,
|
||||
builder: (context) => _thread(
|
||||
pane.sessionId,
|
||||
_back,
|
||||
pane: pane,
|
||||
paneContext: context,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: DetailPane(
|
||||
key: ValueKey('chat-pane-detail-${pane.id}'),
|
||||
destination: AppDestination.chat,
|
||||
implyBack: false,
|
||||
builder: (context) =>
|
||||
_thread(pane.sessionId, _back, pane: pane, paneContext: context),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -31,6 +31,8 @@ import 'conversation/composer_selection_focus.dart';
|
||||
import 'data/chat_repository.dart';
|
||||
import 'domain/chat_commands.dart';
|
||||
import 'domain/chat_cycle.dart';
|
||||
import 'domain/chat_colors.dart';
|
||||
import 'ui/sessions/chat_color_palette.dart';
|
||||
import 'ui/sessions/chat_sessions_body.dart';
|
||||
import 'ui/sessions/chat_sessions_controller.dart';
|
||||
import 'ui/sessions/chat_sessions_screen.dart';
|
||||
@@ -550,7 +552,10 @@ class _ChatScreenState extends State<ChatScreen>
|
||||
excluding: selected == null,
|
||||
child: MediaQuery(
|
||||
data: media.copyWith(
|
||||
padding: media.padding.copyWith(top: system.top),
|
||||
padding: media.padding.copyWith(
|
||||
top: system.top,
|
||||
bottom: system.bottom,
|
||||
),
|
||||
),
|
||||
child: _workspaceView(),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user