Skip to content

Commit

Permalink
fixup! fixup! fixup! TW-403: refactor chat_list and forward screen
Browse files Browse the repository at this point in the history
  • Loading branch information
sherlockvn committed Aug 28, 2023
1 parent 4b3cded commit d998380
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/pages/forward/selectable_chat_list_item.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/pages/chat_list/chat_list_item_style.dart';
import 'package:fluffychat/pages/forward/forward_item_style.dart';
import 'package:fluffychat/pages/forward/selectable_chat_list_item_style.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_locals.dart';
import 'package:fluffychat/widgets/avatar/avatar.dart';
import 'package:flutter/material.dart';
Expand All @@ -26,7 +26,7 @@ class SelectableChatListItem extends StatelessWidget {
MatrixLocals(L10n.of(context)!),
);
return Material(
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
borderRadius: BorderRadius.circular(16.0),
clipBehavior: Clip.hardEdge,
color: Colors.transparent,
child: Theme(
Expand All @@ -49,8 +49,10 @@ class SelectableChatListItem extends StatelessWidget {
),
if (selected)
Positioned(
right: -3,
bottom: -3,
right: SelectableChatListItemStyle
.rightFromAvatarBottomRight,
bottom: SelectableChatListItemStyle
.bottomFromAvatarBottomRight,
child: Container(
width: ForwardItemStyle.selectedContainerSize,
height: ForwardItemStyle.selectedContainerSize,
Expand All @@ -72,12 +74,12 @@ class SelectableChatListItem extends StatelessWidget {
Flexible(
child: Text(
displayName,
overflow: TextOverflow.ellipsis,
maxLines: 1,
softWrap: false,
style: Theme.of(context).textTheme.titleMedium?.copyWith(
overflow: TextOverflow.ellipsis,
letterSpacing: 0.15,
letterSpacing:
SelectableChatListItemStyle.letterSpacing,
color: room.isUnread ||
room.membership == Membership.invite
? Theme.of(context).colorScheme.onSurfaceVariant
Expand Down
5 changes: 5 additions & 0 deletions lib/pages/forward/selectable_chat_list_item_style.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class SelectableChatListItemStyle {
static const rightFromAvatarBottomRight = -3.0;
static const bottomFromAvatarBottomRight = -3.0;
static const letterSpacing = 0.15;
}

0 comments on commit d998380

Please sign in to comment.