|
|
|
@ -580,6 +580,9 @@ class _MessageViewState extends State<MessageView> {
|
|
|
|
|
builder: (context, snapshot) {
|
|
|
|
|
if (snapshot.hasData) {
|
|
|
|
|
var message = snapshot.data! as Message;
|
|
|
|
|
var qTextColor = message.getMetadata().senderHandle != Provider.of<AppState>(context).selectedProfile
|
|
|
|
|
? Provider.of<Settings>(context).theme.messageFromOtherTextColor
|
|
|
|
|
: Provider.of<Settings>(context).theme.messageFromMeTextColor;
|
|
|
|
|
return Container(
|
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
@ -588,6 +591,26 @@ class _MessageViewState extends State<MessageView> {
|
|
|
|
|
: Provider.of<Settings>(context).theme.messageFromMeBackgroundColor,
|
|
|
|
|
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
|
|
|
|
Stack(children: [
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
clipBehavior: Clip.antiAlias,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: message.getMetadata().senderHandle != Provider.of<AppState>(context).selectedProfile
|
|
|
|
|
? Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor
|
|
|
|
|
: Provider.of<Settings>(context).theme.messageFromMeBackgroundColor,
|
|
|
|
|
),
|
|
|
|
|
height: 75,
|
|
|
|
|
child: Row(mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.start, children: [
|
|
|
|
|
Padding(padding: EdgeInsets.symmetric(vertical: 5.0, horizontal: 10.0), child: Icon(Icons.reply, size: 32, color: qTextColor)),
|
|
|
|
|
Flexible(
|
|
|
|
|
child: DefaultTextStyle(
|
|
|
|
|
textWidthBasis: TextWidthBasis.parent,
|
|
|
|
|
child: message.getPreviewWidget(context),
|
|
|
|
|
style: TextStyle(color: qTextColor),
|
|
|
|
|
overflow: TextOverflow.fade,
|
|
|
|
|
))
|
|
|
|
|
])),
|
|
|
|
|
Align(
|
|
|
|
|
alignment: Alignment.topRight,
|
|
|
|
|
child: IconButton(
|
|
|
|
@ -598,16 +621,7 @@ class _MessageViewState extends State<MessageView> {
|
|
|
|
|
Provider.of<AppState>(context, listen: false).selectedIndex = null;
|
|
|
|
|
},
|
|
|
|
|
)),
|
|
|
|
|
Align(
|
|
|
|
|
alignment: Alignment.topLeft,
|
|
|
|
|
child: Padding(padding: EdgeInsets.all(2.0), child: Icon(Icons.reply)),
|
|
|
|
|
)
|
|
|
|
|
]),
|
|
|
|
|
Wrap(
|
|
|
|
|
runAlignment: WrapAlignment.spaceEvenly,
|
|
|
|
|
alignment: WrapAlignment.center,
|
|
|
|
|
runSpacing: 1.0,
|
|
|
|
|
children: [Center(widthFactor: 1.0, child: Padding(padding: EdgeInsets.all(10.0), child: message.getPreviewWidget(context)))]),
|
|
|
|
|
]));
|
|
|
|
|
} else {
|
|
|
|
|
return MessageLoadingBubble();
|
|
|
|
|