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,11 +52,10 @@ 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.push_pin_outlined),
|
icon: const Icon(Icons.copy_outlined),
|
||||||
onPressed: controller.pinEvent,
|
tooltip: L10n.of(context).copyToClipboard,
|
||||||
tooltip: L10n.of(context).pinMessage,
|
onPressed: controller.copyEventsAction,
|
||||||
),
|
),
|
||||||
if (controller.canRedactSelectedEvents)
|
if (controller.canRedactSelectedEvents)
|
||||||
IconButton(
|
IconButton(
|
||||||
|
|
@ -79,15 +78,16 @@ class ChatView extends StatelessWidget {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
itemBuilder: (context) => [
|
itemBuilder: (context) => [
|
||||||
|
if (controller.canPinSelectedEvents)
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
onTap: controller.copyEventsAction,
|
onTap: controller.pinEvent,
|
||||||
value: null,
|
value: null,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
const Icon(Icons.copy_outlined),
|
const Icon(Icons.push_pin_outlined),
|
||||||
const SizedBox(width: 12),
|
const SizedBox(width: 12),
|
||||||
Text(L10n.of(context).copy),
|
Text(L10n.of(context).pinMessage),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue