Merge pull request 'Using build context instead of inherited context when building file bubble popout' (#395) from file_bubble_pop_fix into trunk
continuous-integration/drone/push Build is passing Details

Reviewed-on: #395
This commit is contained in:
Dan Ballard 2022-03-08 19:08:12 +00:00
commit 3c71bb8184
2 changed files with 6 additions and 7 deletions

View File

@ -153,7 +153,6 @@ class CwtchNotifier {
}
break;
case "NewMessageFromPeer":
var identifier = int.parse(data["ConversationID"]);
var messageID = int.parse(data["Index"]);
var timestamp = DateTime.tryParse(data['TimestampReceived'])!;

View File

@ -356,7 +356,7 @@ class FileBubbleState extends State<FileBubble> {
void pop(context, File myFile, Widget meta) async {
await showDialog(
context: context,
builder: (_) => Dialog(
builder: (bcontext) => Dialog(
alignment: Alignment.center,
child: Container(
padding: EdgeInsets.all(10),
@ -365,16 +365,16 @@ class FileBubbleState extends State<FileBubble> {
title: meta,
trailing: IconButton(
icon: Icon(Icons.close),
color: Provider.of<Settings>(context, listen: false).theme.toolbarIconColor,
color: Provider.of<Settings>(bcontext, listen: false).theme.toolbarIconColor,
iconSize: 32,
onPressed: () {
Navigator.pop(context, true);
Navigator.pop(bcontext, true);
})),
Image.file(
myFile,
cacheWidth: (MediaQuery.of(context).size.width * 0.6).floor(),
width: (MediaQuery.of(context).size.width * 0.6),
height: (MediaQuery.of(context).size.height * 0.6),
cacheWidth: (MediaQuery.of(bcontext).size.width * 0.6).floor(),
width: (MediaQuery.of(bcontext).size.width * 0.6),
height: (MediaQuery.of(bcontext).size.height * 0.6),
fit: BoxFit.scaleDown,
),
SizedBox(