fix: hide mute button for self

This commit is contained in:
2025-05-12 14:23:11 +01:00
parent b6a69004e6
commit 062b22b15a
2 changed files with 4 additions and 1 deletions

View File

@ -46,6 +46,7 @@ class _StreamPage extends State<StreamPage> {
setState(() {
_chewieController = ChewieController(
videoPlayerController: _controller!,
aspectRatio: 16 / 9,
autoPlay: true,
placeholder:
(widget.stream.info.image?.isNotEmpty ?? false)

View File

@ -12,7 +12,9 @@ class MuteButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final signer = ndk.accounts.getLoggedAccount()?.signer;
if (signer == null) return SizedBox.shrink();
if (signer == null || signer.getPublicKey() == pubkey) {
return SizedBox.shrink();
}
return FutureBuilder(
future: ndk.lists.getSingleNip51List(Nip51List.kMute, signer),