Remove message opacity
This commit is contained in:
parent
c7371acb13
commit
64b8441649
|
@ -62,83 +62,79 @@ class Message extends StatelessWidget {
|
||||||
|
|
||||||
List<Widget> rowChildren = [
|
List<Widget> rowChildren = [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: AnimatedOpacity(
|
child: Bubble(
|
||||||
duration: Duration(milliseconds: 500),
|
elevation: 0,
|
||||||
opacity: (event.status == 0 || event.redacted) ? 0.5 : 1,
|
radius: Radius.circular(8),
|
||||||
child: Bubble(
|
alignment: alignment,
|
||||||
elevation: 0,
|
margin: BubbleEdges.symmetric(horizontal: 4),
|
||||||
radius: Radius.circular(8),
|
color: color,
|
||||||
alignment: alignment,
|
nip: nip,
|
||||||
margin: BubbleEdges.symmetric(horizontal: 4),
|
child: Stack(
|
||||||
color: color,
|
children: <Widget>[
|
||||||
nip: nip,
|
Column(
|
||||||
child: Stack(
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: <Widget>[
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Column(
|
children: <Widget>[
|
||||||
mainAxisSize: MainAxisSize.min,
|
if (event.isReply)
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
FutureBuilder<Event>(
|
||||||
children: <Widget>[
|
future: event.getReplyEvent(timeline),
|
||||||
if (event.isReply)
|
builder: (BuildContext context, snapshot) {
|
||||||
FutureBuilder<Event>(
|
final Event replyEvent = snapshot.hasData
|
||||||
future: event.getReplyEvent(timeline),
|
? snapshot.data
|
||||||
builder: (BuildContext context, snapshot) {
|
: Event(
|
||||||
final Event replyEvent = snapshot.hasData
|
eventId: event.content['m.relates_to']
|
||||||
? snapshot.data
|
['m.in_reply_to']['event_id'],
|
||||||
: Event(
|
content: {"msgtype": "m.text", "body": "..."},
|
||||||
eventId: event.content['m.relates_to']
|
senderId: event.senderId,
|
||||||
['m.in_reply_to']['event_id'],
|
typeKey: "m.room.message",
|
||||||
content: {"msgtype": "m.text", "body": "..."},
|
room: event.room,
|
||||||
senderId: event.senderId,
|
roomId: event.roomId,
|
||||||
typeKey: "m.room.message",
|
status: 1,
|
||||||
room: event.room,
|
time: DateTime.now(),
|
||||||
roomId: event.roomId,
|
);
|
||||||
status: 1,
|
return Container(
|
||||||
time: DateTime.now(),
|
margin: EdgeInsets.symmetric(vertical: 4.0),
|
||||||
);
|
child:
|
||||||
return Container(
|
ReplyContent(replyEvent, lightText: ownMessage),
|
||||||
margin: EdgeInsets.symmetric(vertical: 4.0),
|
);
|
||||||
child:
|
},
|
||||||
ReplyContent(replyEvent, lightText: ownMessage),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
MessageContent(
|
|
||||||
event,
|
|
||||||
textColor: textColor,
|
|
||||||
),
|
),
|
||||||
if (event.type == EventTypes.Encrypted &&
|
MessageContent(
|
||||||
event.messageType == MessageTypes.BadEncrypted &&
|
event,
|
||||||
event.content["body"] == DecryptError.UNKNOWN_SESSION)
|
textColor: textColor,
|
||||||
RaisedButton(
|
),
|
||||||
color: color.withAlpha(100),
|
if (event.type == EventTypes.Encrypted &&
|
||||||
child: Text(
|
event.messageType == MessageTypes.BadEncrypted &&
|
||||||
I18n.of(context).requestPermission,
|
event.content["body"] == DecryptError.UNKNOWN_SESSION)
|
||||||
style: TextStyle(color: textColor),
|
RaisedButton(
|
||||||
),
|
color: color.withAlpha(100),
|
||||||
onPressed: () => Matrix.of(context)
|
child: Text(
|
||||||
.tryRequestWithLoadingDialog(event.requestKey()),
|
I18n.of(context).requestPermission,
|
||||||
|
style: TextStyle(color: textColor),
|
||||||
),
|
),
|
||||||
SizedBox(height: 4),
|
onPressed: () => Matrix.of(context)
|
||||||
_MetaRow(
|
.tryRequestWithLoadingDialog(event.requestKey()),
|
||||||
event,
|
|
||||||
ownMessage,
|
|
||||||
textColor,
|
|
||||||
invisible: true,
|
|
||||||
),
|
),
|
||||||
],
|
SizedBox(height: 4),
|
||||||
),
|
_MetaRow(
|
||||||
Positioned(
|
|
||||||
bottom: 0,
|
|
||||||
right: ownMessage ? 0 : null,
|
|
||||||
left: !ownMessage ? 0 : null,
|
|
||||||
child: _MetaRow(
|
|
||||||
event,
|
event,
|
||||||
ownMessage,
|
ownMessage,
|
||||||
textColor,
|
textColor,
|
||||||
|
invisible: true,
|
||||||
),
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
bottom: 0,
|
||||||
|
right: ownMessage ? 0 : null,
|
||||||
|
left: !ownMessage ? 0 : null,
|
||||||
|
child: _MetaRow(
|
||||||
|
event,
|
||||||
|
ownMessage,
|
||||||
|
textColor,
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue