fixes #370: remove all controls on full screen media if message is of type ephemeral (#373)

This commit is contained in:
Salvatore Giordano
2021-04-01 12:01:50 +02:00
committed by GitHub
parent b32bf7a8f1
commit 425fd5c4d8
3 changed files with 54 additions and 45 deletions
@@ -185,21 +185,22 @@ class _FullScreenMediaState extends State<FullScreenMedia>
widget.message, StreamChannel.of(context).channel);
},
),
ImageFooter(
currentPage: _currentPage,
totalPages: widget.mediaAttachments.length,
mediaAttachments: widget.mediaAttachments,
message: widget.message,
mediaSelectedCallBack: (val) {
setState(() {
_currentPage = val;
_pageController.animateToPage(val,
duration: Duration(milliseconds: 300),
curve: Curves.easeInOut);
Navigator.pop(context);
});
},
),
if (widget.message.type != 'ephemeral')
ImageFooter(
currentPage: _currentPage,
totalPages: widget.mediaAttachments.length,
mediaAttachments: widget.mediaAttachments,
message: widget.message,
mediaSelectedCallBack: (val) {
setState(() {
_currentPage = val;
_pageController.animateToPage(val,
duration: Duration(milliseconds: 300),
curve: Curves.easeInOut);
Navigator.pop(context);
});
},
),
],
),
),