Remove Cupertino chat conversation branches
Keep the Material-only conversation implementation while preserving public Cupertino parameters for callers. Narrow affected tests to Material hosts so the dead platform paths are no longer exercised.
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
import '../../../core/servers/server_context.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../core/servers/server_context.dart';
|
||||
import '../../../ui/adaptive/segmented_bar.dart';
|
||||
import '../../../ui/adaptive/segmented_bar_overflow.dart';
|
||||
import '../ui/sessions/chat_adaptive.dart';
|
||||
import 'chat_bar_tint.dart';
|
||||
import '../workspace/chat_workspace_pane_scope.dart';
|
||||
|
||||
@@ -60,8 +58,6 @@ class ChatThreadHeader extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final cupertino =
|
||||
chatControlsStyleOf(context) == ChatControlsStyle.cupertino;
|
||||
final tint = chatBarTintOf(context, chatColor);
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
@@ -73,7 +69,7 @@ class ChatThreadHeader extends StatelessWidget {
|
||||
if (action is! SegmentedOverflowable) action,
|
||||
if (moreActions.whereType<SegmentedOverflowable>().isNotEmpty)
|
||||
SegmentedMoreButton(
|
||||
cupertino: cupertino,
|
||||
cupertino: false,
|
||||
entries: [
|
||||
for (final action
|
||||
in moreActions.whereType<SegmentedOverflowable>())
|
||||
@@ -82,7 +78,7 @@ class ChatThreadHeader extends StatelessWidget {
|
||||
),
|
||||
];
|
||||
final Widget bar = SegmentedBar(
|
||||
cupertino: cupertino,
|
||||
cupertino: false,
|
||||
pillColor: tint?.fill,
|
||||
foregroundColor: tint?.foreground,
|
||||
automaticallyImplyLeading: false,
|
||||
@@ -91,16 +87,14 @@ class ChatThreadHeader extends StatelessWidget {
|
||||
leading: showBack
|
||||
? SegmentedBackButton(
|
||||
key: const Key('chat-back'),
|
||||
cupertino: cupertino,
|
||||
cupertino: false,
|
||||
onPressed: onBack,
|
||||
)
|
||||
: null,
|
||||
title: title.isEmpty ? 'Chat' : title,
|
||||
titleLeading: identity,
|
||||
subtitle: ServerContext.metadata(context, folder),
|
||||
subtitleIcon: cupertino
|
||||
? CupertinoIcons.folder
|
||||
: Icons.folder_outlined,
|
||||
subtitleIcon: Icons.folder_outlined,
|
||||
onTitlePressed: onInfo,
|
||||
titleSemanticLabel: 'Chat information',
|
||||
titleKey: const Key('chat-info'),
|
||||
@@ -131,15 +125,13 @@ class ChatThreadHeader extends StatelessWidget {
|
||||
bottomPadding: compact ? 8 : 16,
|
||||
);
|
||||
return ColoredBox(
|
||||
color: cupertino
|
||||
? CupertinoTheme.of(context).scaffoldBackgroundColor
|
||||
: Theme.of(context).colorScheme.surface,
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
child: tint == null
|
||||
? bar
|
||||
: ChatBarTintScope(
|
||||
key: const Key('chat-bar-tint'),
|
||||
tint: tint,
|
||||
cupertino: cupertino,
|
||||
cupertino: false,
|
||||
child: bar,
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user