refactor: change new chat icons on ios

This commit is contained in:
cogwheel0
2025-09-16 15:57:30 +05:30
parent b8195871ff
commit 929ecbb74b
2 changed files with 15 additions and 21 deletions

View File

@@ -1335,9 +1335,7 @@ class _ChatPageState extends ConsumerState<ChatPage> {
if (!_isSelectionMode) ...[ if (!_isSelectionMode) ...[
IconButton( IconButton(
icon: Icon( icon: Icon(
Platform.isIOS Platform.isIOS ? CupertinoIcons.create : Icons.add_comment,
? CupertinoIcons.bubble_left
: Icons.add_comment,
color: context.conduitTheme.textPrimary, color: context.conduitTheme.textPrimary,
size: IconSize.appBar, size: IconSize.appBar,
), ),

View File

@@ -87,9 +87,7 @@ class _ChatsDrawerState extends ConsumerState<ChatsDrawer> {
CupertinoSliverRefreshControl(onRefresh: _refreshChats), CupertinoSliverRefreshControl(onRefresh: _refreshChats),
SliverPadding( SliverPadding(
padding: padding, padding: padding,
sliver: SliverList( sliver: SliverList(delegate: SliverChildListDelegate(children)),
delegate: SliverChildListDelegate(children),
),
), ),
], ],
); );
@@ -158,9 +156,7 @@ class _ChatsDrawerState extends ConsumerState<ChatsDrawer> {
const SizedBox(width: Spacing.sm), const SizedBox(width: Spacing.sm),
IconButton( IconButton(
icon: Icon( icon: Icon(
Platform.isIOS Platform.isIOS ? CupertinoIcons.create : Icons.add_comment,
? CupertinoIcons.bubble_left
: Icons.add_comment,
color: theme.iconPrimary, color: theme.iconPrimary,
size: IconSize.lg, size: IconSize.lg,
), ),
@@ -281,7 +277,8 @@ class _ChatsDrawerState extends ConsumerState<ChatsDrawer> {
// Treat those as regular until the folders list is available and contains the ID. // Treat those as regular until the folders list is available and contains the ID.
final regular = list.where((c) { final regular = list.where((c) {
final hasFolder = (c.folderId != null && c.folderId!.isNotEmpty); final hasFolder = (c.folderId != null && c.folderId!.isNotEmpty);
final folderKnown = hasFolder && availableFolderIds.contains(c.folderId); final folderKnown =
hasFolder && availableFolderIds.contains(c.folderId);
return c.pinned != true && return c.pinned != true &&
c.archived != true && c.archived != true &&
(!hasFolder || !folderKnown); (!hasFolder || !folderKnown);
@@ -327,9 +324,7 @@ class _ChatsDrawerState extends ConsumerState<ChatsDrawer> {
// Show all folders (including empty) // Show all folders (including empty)
final sections = folders.map((folder) { final sections = folders.map((folder) {
final expandedMap = ref.watch( final expandedMap = ref.watch(_expandedFoldersProvider);
_expandedFoldersProvider,
);
final isExpanded = expandedMap[folder.id] ?? false; final isExpanded = expandedMap[folder.id] ?? false;
final convs = grouped[folder.id] ?? const <dynamic>[]; final convs = grouped[folder.id] ?? const <dynamic>[];
return Column( return Column(
@@ -421,7 +416,8 @@ class _ChatsDrawerState extends ConsumerState<ChatsDrawer> {
final regular = list.where((c) { final regular = list.where((c) {
final hasFolder = (c.folderId != null && c.folderId!.isNotEmpty); final hasFolder = (c.folderId != null && c.folderId!.isNotEmpty);
final folderKnown = hasFolder && availableFolderIds.contains(c.folderId); final folderKnown =
hasFolder && availableFolderIds.contains(c.folderId);
return c.pinned != true && return c.pinned != true &&
c.archived != true && c.archived != true &&
(!hasFolder || !folderKnown); (!hasFolder || !folderKnown);
@@ -480,9 +476,7 @@ class _ChatsDrawerState extends ConsumerState<ChatsDrawer> {
), ),
if (isExpanded && convs.isNotEmpty) ...[ if (isExpanded && convs.isNotEmpty) ...[
const SizedBox(height: Spacing.xs), const SizedBox(height: Spacing.xs),
...convs.map( ...convs.map((c) => _buildTileFor(c, inFolder: true)),
(c) => _buildTileFor(c, inFolder: true),
),
const SizedBox(height: Spacing.sm), const SizedBox(height: Spacing.sm),
], ],
], ],
@@ -1502,8 +1496,9 @@ class _ConversationTile extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final theme = context.conduitTheme; final theme = context.conduitTheme;
final Color selectedBackground = final Color selectedBackground = theme.buttonPrimary.withValues(
theme.buttonPrimary.withValues(alpha: 0.10); // subtle highlight alpha: 0.10,
); // subtle highlight
final Color selectedBorder = theme.buttonPrimary.withValues(alpha: 0.60); final Color selectedBorder = theme.buttonPrimary.withValues(alpha: 0.60);
return Semantics( return Semantics(
@@ -1557,8 +1552,9 @@ class _ConversationTile extends StatelessWidget {
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: AppTypography.standard.copyWith( style: AppTypography.standard.copyWith(
color: theme.textPrimary, color: theme.textPrimary,
fontWeight: fontWeight: selected
selected ? FontWeight.w700 : FontWeight.w500, ? FontWeight.w700
: FontWeight.w500,
), ),
), ),
), ),