@@ -22,7 +22,6 @@ import 'page.dart';
2222import 'profile.dart' ;
2323import 'sticky_header.dart' ;
2424import 'store.dart' ;
25- import 'edit_state_marker.dart' ;
2625import 'text.dart' ;
2726import 'theme.dart' ;
2827
@@ -33,7 +32,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
3332 dateSeparator: Colors .black,
3433 dateSeparatorText: const HSLColor .fromAHSL (0.75 , 0 , 0 , 0.15 ).toColor (),
3534 dmRecipientHeaderBg: const HSLColor .fromAHSL (1 , 46 , 0.35 , 0.93 ).toColor (),
36- editedMovedMarkerCollapsed: const Color .fromARGB (128 , 146 , 167 , 182 ),
3735 messageTimestamp: const HSLColor .fromAHSL (0.8 , 0 , 0 , 0.2 ).toColor (),
3836 recipientHeaderText: const HSLColor .fromAHSL (1 , 0 , 0 , 0.15 ).toColor (),
3937 senderBotIcon: const HSLColor .fromAHSL (1 , 180 , 0.08 , 0.65 ).toColor (),
@@ -60,8 +58,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
6058 dateSeparator: Colors .white,
6159 dateSeparatorText: const HSLColor .fromAHSL (0.75 , 0 , 0 , 1 ).toColor (),
6260 dmRecipientHeaderBg: const HSLColor .fromAHSL (1 , 46 , 0.15 , 0.2 ).toColor (),
63- // TODO(design-dark) need proper dark-theme color (this is ad hoc)
64- editedMovedMarkerCollapsed: const Color .fromARGB (128 , 214 , 202 , 194 ),
6561 messageTimestamp: const HSLColor .fromAHSL (0.6 , 0 , 0 , 1 ).toColor (),
6662 recipientHeaderText: const HSLColor .fromAHSL (0.8 , 0 , 0 , 1 ).toColor (),
6763 senderBotIcon: const HSLColor .fromAHSL (1 , 180 , 0.05 , 0.5 ).toColor (),
@@ -86,7 +82,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
8682 required this .dateSeparator,
8783 required this .dateSeparatorText,
8884 required this .dmRecipientHeaderBg,
89- required this .editedMovedMarkerCollapsed,
9085 required this .messageTimestamp,
9186 required this .recipientHeaderText,
9287 required this .senderBotIcon,
@@ -111,7 +106,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
111106 final Color dateSeparator;
112107 final Color dateSeparatorText;
113108 final Color dmRecipientHeaderBg;
114- final Color editedMovedMarkerCollapsed;
115109 final Color messageTimestamp;
116110 final Color recipientHeaderText;
117111 final Color senderBotIcon;
@@ -127,7 +121,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
127121 Color ? dateSeparator,
128122 Color ? dateSeparatorText,
129123 Color ? dmRecipientHeaderBg,
130- Color ? editedMovedMarkerCollapsed,
131124 Color ? messageTimestamp,
132125 Color ? recipientHeaderText,
133126 Color ? senderBotIcon,
@@ -142,7 +135,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
142135 dateSeparator: dateSeparator ?? this .dateSeparator,
143136 dateSeparatorText: dateSeparatorText ?? this .dateSeparatorText,
144137 dmRecipientHeaderBg: dmRecipientHeaderBg ?? this .dmRecipientHeaderBg,
145- editedMovedMarkerCollapsed: editedMovedMarkerCollapsed ?? this .editedMovedMarkerCollapsed,
146138 messageTimestamp: messageTimestamp ?? this .messageTimestamp,
147139 recipientHeaderText: recipientHeaderText ?? this .recipientHeaderText,
148140 senderBotIcon: senderBotIcon ?? this .senderBotIcon,
@@ -164,7 +156,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
164156 dateSeparator: Color .lerp (dateSeparator, other.dateSeparator, t)! ,
165157 dateSeparatorText: Color .lerp (dateSeparatorText, other.dateSeparatorText, t)! ,
166158 dmRecipientHeaderBg: Color .lerp (streamMessageBgDefault, other.dmRecipientHeaderBg, t)! ,
167- editedMovedMarkerCollapsed: Color .lerp (editedMovedMarkerCollapsed, other.editedMovedMarkerCollapsed, t)! ,
168159 messageTimestamp: Color .lerp (messageTimestamp, other.messageTimestamp, t)! ,
169160 recipientHeaderText: Color .lerp (recipientHeaderText, other.recipientHeaderText, t)! ,
170161 senderBotIcon: Color .lerp (senderBotIcon, other.senderBotIcon, t)! ,
@@ -1256,6 +1247,16 @@ class MessageWithPossibleSender extends StatelessWidget {
12561247 ]);
12571248 }
12581249
1250+ final localizations = ZulipLocalizations .of (context);
1251+ String ? editStateText;
1252+ switch (message.editState) {
1253+ case MessageEditState .edited:
1254+ editStateText = localizations.messageIsEditedLabel;
1255+ case MessageEditState .moved:
1256+ editStateText = localizations.messageIsMovedLabel;
1257+ case MessageEditState .none:
1258+ }
1259+
12591260 return GestureDetector (
12601261 behavior: HitTestBehavior .translucent,
12611262 onLongPress: () => showMessageActionSheet (context: context, message: message),
@@ -1265,15 +1266,25 @@ class MessageWithPossibleSender extends StatelessWidget {
12651266 if (senderRow != null )
12661267 Padding (padding: const EdgeInsets .fromLTRB (16 , 2 , 16 , 0 ),
12671268 child: senderRow),
1268- EditStateMarker (
1269- editState: message.editState,
1269+ Row (
1270+ crossAxisAlignment: CrossAxisAlignment .baseline,
1271+ textBaseline: localizedTextBaseline (context),
12701272 children: [
1273+ const SizedBox (width: 16 ),
12711274 Expanded (child: Column (
12721275 crossAxisAlignment: CrossAxisAlignment .stretch,
12731276 children: [
12741277 MessageContent (message: message, content: item.content),
1278+ if (editStateText != null )
1279+ Text (editStateText, textAlign: TextAlign .end,
1280+ style: TextStyle (
1281+ color: designVariables.labelEdited,
1282+ fontSize: 12 ,
1283+ height: (12 / 12 ),
1284+ letterSpacing: proportionalLetterSpacing (
1285+ context, 0.05 , baseFontSize: 12 ))),
12751286 if ((message.reactions? .total ?? 0 ) > 0 )
1276- ReactionChipsList (messageId: message.id, reactions: message.reactions! )
1287+ ReactionChipsList (messageId: message.id, reactions: message.reactions! ),
12771288 ])),
12781289 SizedBox (width: 16 ,
12791290 child: message.flags.contains (MessageFlag .starred)
0 commit comments