@@ -33,7 +33,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
33
33
dateSeparator: Colors .black,
34
34
dateSeparatorText: const HSLColor .fromAHSL (0.75 , 0 , 0 , 0.15 ).toColor (),
35
35
dmRecipientHeaderBg: const HSLColor .fromAHSL (1 , 46 , 0.35 , 0.93 ).toColor (),
36
- editedMovedMarkerCollapsed : const Color . fromARGB ( 128 , 146 , 167 , 182 ),
36
+ editedMovedMarker : Colors .black. withOpacity ( 0.35 ),
37
37
messageTimestamp: const HSLColor .fromAHSL (0.8 , 0 , 0 , 0.2 ).toColor (),
38
38
recipientHeaderText: const HSLColor .fromAHSL (1 , 0 , 0 , 0.15 ).toColor (),
39
39
senderBotIcon: const HSLColor .fromAHSL (1 , 180 , 0.08 , 0.65 ).toColor (),
@@ -60,8 +60,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
60
60
dateSeparator: Colors .white,
61
61
dateSeparatorText: const HSLColor .fromAHSL (0.75 , 0 , 0 , 1 ).toColor (),
62
62
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 ),
63
+ editedMovedMarker: Colors .white.withOpacity (0.35 ),
65
64
messageTimestamp: const HSLColor .fromAHSL (0.6 , 0 , 0 , 1 ).toColor (),
66
65
recipientHeaderText: const HSLColor .fromAHSL (0.8 , 0 , 0 , 1 ).toColor (),
67
66
senderBotIcon: const HSLColor .fromAHSL (1 , 180 , 0.05 , 0.5 ).toColor (),
@@ -86,7 +85,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
86
85
required this .dateSeparator,
87
86
required this .dateSeparatorText,
88
87
required this .dmRecipientHeaderBg,
89
- required this .editedMovedMarkerCollapsed ,
88
+ required this .editedMovedMarker ,
90
89
required this .messageTimestamp,
91
90
required this .recipientHeaderText,
92
91
required this .senderBotIcon,
@@ -111,7 +110,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
111
110
final Color dateSeparator;
112
111
final Color dateSeparatorText;
113
112
final Color dmRecipientHeaderBg;
114
- final Color editedMovedMarkerCollapsed ;
113
+ final Color editedMovedMarker ;
115
114
final Color messageTimestamp;
116
115
final Color recipientHeaderText;
117
116
final Color senderBotIcon;
@@ -127,7 +126,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
127
126
Color ? dateSeparator,
128
127
Color ? dateSeparatorText,
129
128
Color ? dmRecipientHeaderBg,
130
- Color ? editedMovedMarkerCollapsed ,
129
+ Color ? editedMovedMarker ,
131
130
Color ? messageTimestamp,
132
131
Color ? recipientHeaderText,
133
132
Color ? senderBotIcon,
@@ -142,7 +141,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
142
141
dateSeparator: dateSeparator ?? this .dateSeparator,
143
142
dateSeparatorText: dateSeparatorText ?? this .dateSeparatorText,
144
143
dmRecipientHeaderBg: dmRecipientHeaderBg ?? this .dmRecipientHeaderBg,
145
- editedMovedMarkerCollapsed : editedMovedMarkerCollapsed ?? this .editedMovedMarkerCollapsed ,
144
+ editedMovedMarker : editedMovedMarker ?? this .editedMovedMarker ,
146
145
messageTimestamp: messageTimestamp ?? this .messageTimestamp,
147
146
recipientHeaderText: recipientHeaderText ?? this .recipientHeaderText,
148
147
senderBotIcon: senderBotIcon ?? this .senderBotIcon,
@@ -164,7 +163,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
164
163
dateSeparator: Color .lerp (dateSeparator, other.dateSeparator, t)! ,
165
164
dateSeparatorText: Color .lerp (dateSeparatorText, other.dateSeparatorText, t)! ,
166
165
dmRecipientHeaderBg: Color .lerp (streamMessageBgDefault, other.dmRecipientHeaderBg, t)! ,
167
- editedMovedMarkerCollapsed : Color .lerp (editedMovedMarkerCollapsed , other.editedMovedMarkerCollapsed , t)! ,
166
+ editedMovedMarker : Color .lerp (editedMovedMarker , other.editedMovedMarker , t)! ,
168
167
messageTimestamp: Color .lerp (messageTimestamp, other.messageTimestamp, t)! ,
169
168
recipientHeaderText: Color .lerp (recipientHeaderText, other.recipientHeaderText, t)! ,
170
169
senderBotIcon: Color .lerp (senderBotIcon, other.senderBotIcon, t)! ,
@@ -1253,6 +1252,29 @@ class MessageWithPossibleSender extends StatelessWidget {
1253
1252
]);
1254
1253
}
1255
1254
1255
+ Widget ? editStateRow;
1256
+ if (message.editState != MessageEditState .none) {
1257
+ final localizations = ZulipLocalizations .of (context);
1258
+ final String editStateText;
1259
+ switch (message.editState) {
1260
+ case MessageEditState .edited:
1261
+ editStateText = localizations.messageIsEditedLabel;
1262
+ case MessageEditState .moved:
1263
+ editStateText = localizations.messageIsMovedLabel;
1264
+ case MessageEditState .none:
1265
+ editStateText = '' ;
1266
+ assert (false );
1267
+ }
1268
+ editStateRow = Text (editStateText,
1269
+ textAlign: TextAlign .end,
1270
+ style: TextStyle (
1271
+ color: messageListTheme.editedMovedMarker,
1272
+ fontFamily: 'Source Sans 3' ,
1273
+ fontSize: 12 ,
1274
+ height: (12 / 12 ),
1275
+ ));
1276
+ }
1277
+
1256
1278
return GestureDetector (
1257
1279
behavior: HitTestBehavior .translucent,
1258
1280
onLongPress: () => showMessageActionSheet (context: context, message: message),
@@ -1262,21 +1284,27 @@ class MessageWithPossibleSender extends StatelessWidget {
1262
1284
if (senderRow != null )
1263
1285
Padding (padding: const EdgeInsets .fromLTRB (16 , 2 , 16 , 0 ),
1264
1286
child: senderRow),
1265
- EditStateMarker (
1266
- editState: message.editState,
1287
+ Row (
1288
+ crossAxisAlignment: CrossAxisAlignment .baseline,
1289
+ textBaseline: localizedTextBaseline (context),
1267
1290
children: [
1268
- Expanded (child: Column (
1269
- crossAxisAlignment: CrossAxisAlignment .stretch,
1270
- children: [
1271
- MessageContent (message: message, content: item.content),
1272
- if ((message.reactions? .total ?? 0 ) > 0 )
1273
- ReactionChipsList (messageId: message.id, reactions: message.reactions! )
1274
- ])),
1291
+ const SizedBox (width: 16 ),
1292
+ Expanded (
1293
+ child: Column (
1294
+ crossAxisAlignment: CrossAxisAlignment .stretch,
1295
+ children: [
1296
+ MessageContent (message: message, content: item.content),
1297
+ if ((message.reactions? .total ?? 0 ) > 0 )
1298
+ ReactionChipsList (messageId: message.id, reactions: message.reactions! ),
1299
+ if (editStateRow != null )
1300
+ editStateRow,
1301
+ ]),
1302
+ ),
1275
1303
SizedBox (width: 16 ,
1276
1304
child: message.flags.contains (MessageFlag .starred)
1277
1305
? Icon (ZulipIcons .star_filled, size: 16 , color: designVariables.star)
1278
1306
: null ),
1279
- ]),
1307
+ ]),
1280
1308
])));
1281
1309
}
1282
1310
}
0 commit comments