@@ -852,23 +852,25 @@ class MessageWithPossibleSender extends StatelessWidget {
852
852
final time = _kMessageTimestampFormat
853
853
.format (DateTime .fromMillisecondsSinceEpoch (1000 * message.timestamp));
854
854
855
+ final senderRow = item.showSender
856
+ ? Padding (
857
+ padding: const EdgeInsets .fromLTRB (3 , 6 , 11 , 0 ),
858
+ child: GestureDetector (
859
+ onTap: () => Navigator .push (context,
860
+ ProfilePage .buildRoute (context: context,
861
+ userId: message.senderId)),
862
+ child: Avatar (size: 35 , borderRadius: 4 ,
863
+ userId: message.senderId)))
864
+ : const SizedBox (width: 3 + 35 + 11 );
865
+
855
866
return GestureDetector (
856
867
behavior: HitTestBehavior .translucent,
857
868
onLongPress: () => showMessageActionSheet (context: context, message: message),
858
869
// TODO clean up this layout, by less precisely imitating web
859
870
child: Padding (
860
871
padding: const EdgeInsets .only (top: 2 , bottom: 3 , left: 8 , right: 8 ),
861
872
child: Row (crossAxisAlignment: CrossAxisAlignment .start, children: [
862
- item.showSender
863
- ? Padding (
864
- padding: const EdgeInsets .fromLTRB (3 , 6 , 11 , 0 ),
865
- child: GestureDetector (
866
- onTap: () => Navigator .push (context,
867
- ProfilePage .buildRoute (context: context,
868
- userId: message.senderId)),
869
- child: Avatar (size: 35 , borderRadius: 4 ,
870
- userId: message.senderId)))
871
- : const SizedBox (width: 3 + 35 + 11 ),
873
+ senderRow,
872
874
Expanded (
873
875
child: Column (
874
876
crossAxisAlignment: CrossAxisAlignment .stretch,
0 commit comments