Handle viewing replies to images correctly
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
ad52f2e0c8
commit
7540aed701
|
@ -372,6 +372,9 @@ void modalShowReplies(
|
||||||
builder: (BuildContext bcontext) {
|
builder: (BuildContext bcontext) {
|
||||||
List<Message> replies = getReplies(cache, messageID);
|
List<Message> replies = getReplies(cache, messageID);
|
||||||
|
|
||||||
|
return ChangeNotifierProvider.value(
|
||||||
|
value: profile,
|
||||||
|
builder: (bcontext, child) {
|
||||||
return LayoutBuilder(builder: (BuildContext context, BoxConstraints viewportConstraints) {
|
return LayoutBuilder(builder: (BuildContext context, BoxConstraints viewportConstraints) {
|
||||||
var replyWidgets = replies.map((e) {
|
var replyWidgets = replies.map((e) {
|
||||||
var fromMe = e.getMetadata().senderHandle == profile.onion;
|
var fromMe = e.getMetadata().senderHandle == profile.onion;
|
||||||
|
@ -408,7 +411,8 @@ void modalShowReplies(
|
||||||
|
|
||||||
var withHeader = replyWidgets;
|
var withHeader = replyWidgets;
|
||||||
|
|
||||||
var original = StaticMessageBubble(profile, settings, cache.cache[messageID]!.metadata, Row(children: [Flexible(child: compileOverlay(cache.cache[messageID]!).getPreviewWidget(context))]));
|
var original =
|
||||||
|
StaticMessageBubble(profile, settings, cache.cache[messageID]!.metadata, Row(children: [Flexible(child: compileOverlay(cache.cache[messageID]!).getPreviewWidget(context))]));
|
||||||
|
|
||||||
withHeader.insert(0, Padding(padding: EdgeInsets.fromLTRB(10.0, 10.0, 2.0, 15.0), child: Center(child: original)));
|
withHeader.insert(0, Padding(padding: EdgeInsets.fromLTRB(10.0, 10.0, 2.0, 15.0), child: Center(child: original)));
|
||||||
|
|
||||||
|
@ -423,7 +427,8 @@ void modalShowReplies(
|
||||||
if (replies.isNotEmpty) {
|
if (replies.isNotEmpty) {
|
||||||
withHeader.insert(2, Padding(padding: EdgeInsets.fromLTRB(10.0, 10.0, 2.0, 15.0), child: Text(replyHeader, style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold))));
|
withHeader.insert(2, Padding(padding: EdgeInsets.fromLTRB(10.0, 10.0, 2.0, 15.0), child: Text(replyHeader, style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold))));
|
||||||
} else {
|
} else {
|
||||||
withHeader.insert(2, Padding(padding: EdgeInsets.fromLTRB(10.0, 10.0, 2.0, 15.0), child: Center(child: Text(noRepliesText, style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold)))));
|
withHeader.insert(
|
||||||
|
2, Padding(padding: EdgeInsets.fromLTRB(10.0, 10.0, 2.0, 15.0), child: Center(child: Text(noRepliesText, style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold)))));
|
||||||
}
|
}
|
||||||
|
|
||||||
return Scrollbar(
|
return Scrollbar(
|
||||||
|
@ -442,4 +447,5 @@ void modalShowReplies(
|
||||||
)))));
|
)))));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue