Merge pull request 'Fix Quoting of Large Messages' (#517) from fixquote into trunk
continuous-integration/drone/push Build is pending
Details
continuous-integration/drone/push Build is pending
Details
Reviewed-on: #517
This commit is contained in:
commit
c3fa6735f5
|
@ -580,6 +580,9 @@ class _MessageViewState extends State<MessageView> {
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
if (snapshot.hasData) {
|
if (snapshot.hasData) {
|
||||||
var message = snapshot.data! as Message;
|
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(
|
return Container(
|
||||||
margin: EdgeInsets.all(5),
|
margin: EdgeInsets.all(5),
|
||||||
padding: EdgeInsets.all(5),
|
padding: EdgeInsets.all(5),
|
||||||
|
@ -588,6 +591,26 @@ class _MessageViewState extends State<MessageView> {
|
||||||
: Provider.of<Settings>(context).theme.messageFromMeBackgroundColor,
|
: Provider.of<Settings>(context).theme.messageFromMeBackgroundColor,
|
||||||
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||||
Stack(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(
|
Align(
|
||||||
alignment: Alignment.topRight,
|
alignment: Alignment.topRight,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
|
@ -598,16 +621,7 @@ class _MessageViewState extends State<MessageView> {
|
||||||
Provider.of<AppState>(context, listen: false).selectedIndex = null;
|
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 {
|
} else {
|
||||||
return MessageLoadingBubble();
|
return MessageLoadingBubble();
|
||||||
|
|
Loading…
Reference in New Issue