@@ -22,7 +22,6 @@ import 'page.dart';
22
22
import 'profile.dart' ;
23
23
import 'sticky_header.dart' ;
24
24
import 'store.dart' ;
25
- import 'edit_state_marker.dart' ;
26
25
import 'text.dart' ;
27
26
import 'theme.dart' ;
28
27
@@ -33,7 +32,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
33
32
dateSeparator: Colors .black,
34
33
dateSeparatorText: const HSLColor .fromAHSL (0.75 , 0 , 0 , 0.15 ).toColor (),
35
34
dmRecipientHeaderBg: const HSLColor .fromAHSL (1 , 46 , 0.35 , 0.93 ).toColor (),
36
- editedMovedMarkerCollapsed: const Color .fromARGB (128 , 146 , 167 , 182 ),
37
35
messageTimestamp: const HSLColor .fromAHSL (0.8 , 0 , 0 , 0.2 ).toColor (),
38
36
recipientHeaderText: const HSLColor .fromAHSL (1 , 0 , 0 , 0.15 ).toColor (),
39
37
senderBotIcon: const HSLColor .fromAHSL (1 , 180 , 0.08 , 0.65 ).toColor (),
@@ -60,8 +58,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
60
58
dateSeparator: Colors .white,
61
59
dateSeparatorText: const HSLColor .fromAHSL (0.75 , 0 , 0 , 1 ).toColor (),
62
60
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 ),
65
61
messageTimestamp: const HSLColor .fromAHSL (0.6 , 0 , 0 , 1 ).toColor (),
66
62
recipientHeaderText: const HSLColor .fromAHSL (0.8 , 0 , 0 , 1 ).toColor (),
67
63
senderBotIcon: const HSLColor .fromAHSL (1 , 180 , 0.05 , 0.5 ).toColor (),
@@ -86,7 +82,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
86
82
required this .dateSeparator,
87
83
required this .dateSeparatorText,
88
84
required this .dmRecipientHeaderBg,
89
- required this .editedMovedMarkerCollapsed,
90
85
required this .messageTimestamp,
91
86
required this .recipientHeaderText,
92
87
required this .senderBotIcon,
@@ -111,7 +106,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
111
106
final Color dateSeparator;
112
107
final Color dateSeparatorText;
113
108
final Color dmRecipientHeaderBg;
114
- final Color editedMovedMarkerCollapsed;
115
109
final Color messageTimestamp;
116
110
final Color recipientHeaderText;
117
111
final Color senderBotIcon;
@@ -127,7 +121,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
127
121
Color ? dateSeparator,
128
122
Color ? dateSeparatorText,
129
123
Color ? dmRecipientHeaderBg,
130
- Color ? editedMovedMarkerCollapsed,
131
124
Color ? messageTimestamp,
132
125
Color ? recipientHeaderText,
133
126
Color ? senderBotIcon,
@@ -142,7 +135,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
142
135
dateSeparator: dateSeparator ?? this .dateSeparator,
143
136
dateSeparatorText: dateSeparatorText ?? this .dateSeparatorText,
144
137
dmRecipientHeaderBg: dmRecipientHeaderBg ?? this .dmRecipientHeaderBg,
145
- editedMovedMarkerCollapsed: editedMovedMarkerCollapsed ?? this .editedMovedMarkerCollapsed,
146
138
messageTimestamp: messageTimestamp ?? this .messageTimestamp,
147
139
recipientHeaderText: recipientHeaderText ?? this .recipientHeaderText,
148
140
senderBotIcon: senderBotIcon ?? this .senderBotIcon,
@@ -164,7 +156,6 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
164
156
dateSeparator: Color .lerp (dateSeparator, other.dateSeparator, t)! ,
165
157
dateSeparatorText: Color .lerp (dateSeparatorText, other.dateSeparatorText, t)! ,
166
158
dmRecipientHeaderBg: Color .lerp (streamMessageBgDefault, other.dmRecipientHeaderBg, t)! ,
167
- editedMovedMarkerCollapsed: Color .lerp (editedMovedMarkerCollapsed, other.editedMovedMarkerCollapsed, t)! ,
168
159
messageTimestamp: Color .lerp (messageTimestamp, other.messageTimestamp, t)! ,
169
160
recipientHeaderText: Color .lerp (recipientHeaderText, other.recipientHeaderText, t)! ,
170
161
senderBotIcon: Color .lerp (senderBotIcon, other.senderBotIcon, t)! ,
@@ -1256,6 +1247,16 @@ class MessageWithPossibleSender extends StatelessWidget {
1256
1247
]);
1257
1248
}
1258
1249
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
+
1259
1260
return GestureDetector (
1260
1261
behavior: HitTestBehavior .translucent,
1261
1262
onLongPress: () => showMessageActionSheet (context: context, message: message),
@@ -1265,15 +1266,25 @@ class MessageWithPossibleSender extends StatelessWidget {
1265
1266
if (senderRow != null )
1266
1267
Padding (padding: const EdgeInsets .fromLTRB (16 , 2 , 16 , 0 ),
1267
1268
child: senderRow),
1268
- EditStateMarker (
1269
- editState: message.editState,
1269
+ Row (
1270
+ crossAxisAlignment: CrossAxisAlignment .baseline,
1271
+ textBaseline: localizedTextBaseline (context),
1270
1272
children: [
1273
+ const SizedBox (width: 16 ),
1271
1274
Expanded (child: Column (
1272
1275
crossAxisAlignment: CrossAxisAlignment .stretch,
1273
1276
children: [
1274
1277
MessageContent (message: message, content: item.content),
1275
1278
if ((message.reactions? .total ?? 0 ) > 0 )
1276
- ReactionChipsList (messageId: message.id, reactions: message.reactions! )
1279
+ ReactionChipsList (messageId: message.id, reactions: message.reactions! ),
1280
+ if (editStateText != null )
1281
+ Text (editStateText, textAlign: TextAlign .end,
1282
+ style: TextStyle (
1283
+ color: designVariables.labelEdited,
1284
+ fontSize: 12 ,
1285
+ height: (12 / 12 ),
1286
+ letterSpacing: proportionalLetterSpacing (
1287
+ context, 0.05 , baseFontSize: 12 ))),
1277
1288
])),
1278
1289
SizedBox (width: 16 ,
1279
1290
child: message.flags.contains (MessageFlag .starred)
0 commit comments