|
|
@ -1,4 +1,5 @@ |
|
|
|
import 'dart:io'; |
|
|
|
import 'dart:math'; |
|
|
|
|
|
|
|
import 'package:cwtch/config.dart'; |
|
|
|
import 'package:cwtch/models/contact.dart'; |
|
|
@ -53,7 +54,7 @@ class FileBubbleState extends State<FileBubble> { |
|
|
|
filterQuality: FilterQuality.medium, |
|
|
|
fit: BoxFit.scaleDown, |
|
|
|
alignment: Alignment.center, |
|
|
|
height: MediaQuery.of(context).size.height * 0.30, |
|
|
|
height: min(MediaQuery.of(context).size.height * 0.30, 150), |
|
|
|
isAntiAlias: false, |
|
|
|
errorBuilder: (context, error, stackTrace) { |
|
|
|
return MalformedBubble(); |
|
|
@ -153,6 +154,7 @@ class FileBubbleState extends State<FileBubble> { |
|
|
|
if (Provider.of<Settings>(context).shouldPreview(path)) { |
|
|
|
isPreview = true; |
|
|
|
wdgDecorations = Center( |
|
|
|
widthFactor: 1.0, |
|
|
|
child: MouseRegion( |
|
|
|
cursor: SystemMouseCursors.click, |
|
|
|
child: GestureDetector( |
|
|
@ -223,7 +225,18 @@ class FileBubbleState extends State<FileBubble> { |
|
|
|
crossAxisAlignment: fromMe ? CrossAxisAlignment.end : CrossAxisAlignment.start, |
|
|
|
mainAxisAlignment: fromMe ? MainAxisAlignment.end : MainAxisAlignment.start, |
|
|
|
mainAxisSize: MainAxisSize.min, |
|
|
|
children: [wdgSender, isPreview ? Container() : wdgMessage, wdgDecorations, messageStatusWidget]), |
|
|
|
children: [ |
|
|
|
wdgSender, |
|
|
|
isPreview |
|
|
|
? Container( |
|
|
|
width: 0, |
|
|
|
padding: EdgeInsets.zero, |
|
|
|
margin: EdgeInsets.zero, |
|
|
|
) |
|
|
|
: wdgMessage, |
|
|
|
wdgDecorations, |
|
|
|
messageStatusWidget |
|
|
|
]), |
|
|
|
)); |
|
|
|
}); |
|
|
|
} |
|
|
|