chore: on click play unsent audio message, show toolbar (#3527)
This commit is contained in:
parent
2d8b4c613d
commit
a24e00cc21
2 changed files with 13 additions and 2 deletions
|
|
@ -164,6 +164,14 @@ class AudioPlayerState extends State<AudioPlayerWidget> {
|
|||
}
|
||||
|
||||
void _onButtonTap() async {
|
||||
// #Pangea
|
||||
// https://github.com/pangeachat/client/issues/3458
|
||||
if (widget.event != null && !widget.event!.status.isSent) {
|
||||
widget.chatController.showToolbar(widget.event!);
|
||||
return;
|
||||
}
|
||||
// Pangea#
|
||||
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
ScaffoldMessenger.of(matrix.context).clearMaterialBanners();
|
||||
});
|
||||
|
|
@ -435,7 +443,10 @@ class AudioPlayerState extends State<AudioPlayerWidget> {
|
|||
}
|
||||
|
||||
// #Pangea
|
||||
if (widget.autoplay) _onButtonTap();
|
||||
if (widget.autoplay &&
|
||||
(widget.event == null || widget.event!.status.isSent)) {
|
||||
_onButtonTap();
|
||||
}
|
||||
// Pangea#
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ class MessageSelectionPositionerState extends State<MessageSelectionPositioner>
|
|||
|
||||
void _onContentSizeChanged(_) {
|
||||
Future.delayed(FluffyThemes.animationDuration, () {
|
||||
setState(() {});
|
||||
if (mounted) setState(() {});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue