forked from Nexus/nexus
only show hide option for local events
This commit is contained in:
parent
39b8242867
commit
256e5fadbe
1 changed files with 16 additions and 14 deletions
|
|
@ -82,6 +82,18 @@ extension BuildEventOptions on Event {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (eventId.isFake) {
|
||||||
|
return [
|
||||||
|
PopupMenuItem(
|
||||||
|
onTap: () => ref.read(notifier).hideClientSticky(rowId),
|
||||||
|
child: ListTile(
|
||||||
|
leading: Icon(Icons.delete, color: danger),
|
||||||
|
title: Text("Hide", style: .new(color: danger)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
].lock;
|
||||||
|
}
|
||||||
|
|
||||||
return .new([
|
return .new([
|
||||||
if (ref.read(
|
if (ref.read(
|
||||||
PowerLevelController.provider(
|
PowerLevelController.provider(
|
||||||
|
|
@ -245,8 +257,7 @@ extension BuildEventOptions on Event {
|
||||||
PowerLevelController.provider(
|
PowerLevelController.provider(
|
||||||
.redaction(targetUser: sender, roomId: roomId),
|
.redaction(targetUser: sender, roomId: roomId),
|
||||||
),
|
),
|
||||||
) &&
|
))
|
||||||
!eventId.isFake)
|
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
onTap: () => showReasonSheet(
|
onTap: () => showReasonSheet(
|
||||||
title: "Delete Message",
|
title: "Delete Message",
|
||||||
|
|
@ -263,15 +274,6 @@ extension BuildEventOptions on Event {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
if (eventId.isFake)
|
|
||||||
PopupMenuItem(
|
|
||||||
onTap: () => ref.read(notifier).hideClientSticky(rowId),
|
|
||||||
child: ListTile(
|
|
||||||
leading: Icon(Icons.delete, color: danger),
|
|
||||||
title: Text("Hide", style: .new(color: danger)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
onTap: () => showReasonSheet(
|
onTap: () => showReasonSheet(
|
||||||
title: "Report",
|
title: "Report",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue