mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 12:59:21 +00:00
Improve messages appearance
This commit is contained in:
parent
c1196a6359
commit
201200299c
@ -62,7 +62,7 @@ class ConversationMessageTile extends StatelessWidget {
|
||||
color: Colors.white,
|
||||
size: 14,
|
||||
),
|
||||
onSelected: _menuOptionSelected,
|
||||
onSelected: (v) => _menuOptionSelected(context, v),
|
||||
itemBuilder: (c) => <PopupMenuItem<_MenuChoices>>[
|
||||
PopupMenuItem(
|
||||
enabled: (message.message?.content ?? "") != "",
|
||||
@ -117,14 +117,16 @@ class ConversationMessageTile extends StatelessWidget {
|
||||
}
|
||||
|
||||
/// Process menu choice
|
||||
void _menuOptionSelected(_MenuChoices value) {
|
||||
void _menuOptionSelected(BuildContext context, _MenuChoices value) {
|
||||
switch (value) {
|
||||
case _MenuChoices.COPY_MESSAGE:
|
||||
FlutterClipboard.copy(message.message.content);
|
||||
snack(context, tr("'${message.message.content}' copied to clipboard!"));
|
||||
break;
|
||||
|
||||
case _MenuChoices.COPY_URL:
|
||||
FlutterClipboard.copy(message.file.url);
|
||||
snack(context, tr("'${message.file.url}' copied to clipboard!"));
|
||||
break;
|
||||
|
||||
case _MenuChoices.GET_STATS:
|
||||
|
@ -36,8 +36,11 @@ class _ConversationFileWidgetState extends State<ConversationFileWidget> {
|
||||
@override
|
||||
Widget build(BuildContext context) => Stack(
|
||||
children: [
|
||||
!file.hasThumbnail
|
||||
? Container()
|
||||
!file.hasThumbnail ||
|
||||
file.fileType == ConversationMessageFileType.IMAGE
|
||||
? Container(
|
||||
width: 0,
|
||||
)
|
||||
: Opacity(
|
||||
opacity: 0.8,
|
||||
child: CachedNetworkImage(
|
||||
|
Loading…
Reference in New Issue
Block a user