chore: Replace copy action with pin event action in UI
This commit is contained in:
parent
489402be91
commit
a8bcf12763
1 changed files with 17 additions and 17 deletions
|
|
@ -52,12 +52,11 @@ class ChatView extends StatelessWidget {
|
||||||
onPressed: () => controller
|
onPressed: () => controller
|
||||||
.enterThread(controller.selectedEvents.single.eventId),
|
.enterThread(controller.selectedEvents.single.eventId),
|
||||||
),
|
),
|
||||||
if (controller.canPinSelectedEvents)
|
IconButton(
|
||||||
IconButton(
|
icon: const Icon(Icons.copy_outlined),
|
||||||
icon: const Icon(Icons.push_pin_outlined),
|
tooltip: L10n.of(context).copyToClipboard,
|
||||||
onPressed: controller.pinEvent,
|
onPressed: controller.copyEventsAction,
|
||||||
tooltip: L10n.of(context).pinMessage,
|
),
|
||||||
),
|
|
||||||
if (controller.canRedactSelectedEvents)
|
if (controller.canRedactSelectedEvents)
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.delete_outlined),
|
icon: const Icon(Icons.delete_outlined),
|
||||||
|
|
@ -79,18 +78,19 @@ class ChatView extends StatelessWidget {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
itemBuilder: (context) => [
|
itemBuilder: (context) => [
|
||||||
PopupMenuItem(
|
if (controller.canPinSelectedEvents)
|
||||||
onTap: controller.copyEventsAction,
|
PopupMenuItem(
|
||||||
value: null,
|
onTap: controller.pinEvent,
|
||||||
child: Row(
|
value: null,
|
||||||
mainAxisSize: MainAxisSize.min,
|
child: Row(
|
||||||
children: [
|
mainAxisSize: MainAxisSize.min,
|
||||||
const Icon(Icons.copy_outlined),
|
children: [
|
||||||
const SizedBox(width: 12),
|
const Icon(Icons.push_pin_outlined),
|
||||||
Text(L10n.of(context).copy),
|
const SizedBox(width: 12),
|
||||||
],
|
Text(L10n.of(context).pinMessage),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
if (controller.canSaveSelectedEvent)
|
if (controller.canSaveSelectedEvent)
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
onTap: () => controller.saveSelectedEvent(context),
|
onTap: () => controller.saveSelectedEvent(context),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue