Hide markAsNsfw and markAsAd if user do not have permissions

This commit is contained in:
2024-02-08 09:55:06 +08:00
parent 04e73abe47
commit 91144bf8f1
5 changed files with 57 additions and 26 deletions

View File

@@ -212,7 +212,7 @@ List<PopupMenuEntry<MoreVertSettings>> buildMoreVertSettings(
title: Text(AppLocalizations.of(context)!.displayAd),
),
)));
if (path == "/gallery/:gid") {
if (path == "/gallery/:gid" && auth.canEditGallery == true) {
list.add(const PopupMenuDivider());
final isAllNsfw = GalleryPage.of(context).isAllNsfw;
if (isAllNsfw != null) {