Skip to content

Commit

Permalink
Merge pull request #260 from pangeachat/remove-copy-option
Browse files Browse the repository at this point in the history
Situationally remove copy option on selection
  • Loading branch information
ggurdin authored May 29, 2024
2 parents 19350f5 + ed6b197 commit ffe49bd
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions lib/pages/chat/chat_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ class ChatView extends StatelessWidget {
tooltip: L10n.of(context)!.edit,
onPressed: controller.editSelectedEventAction,
),
IconButton(
icon: const Icon(Icons.copy_outlined),
tooltip: L10n.of(context)!.copy,
onPressed: controller.copyEventsAction,
),
// #Pangea
if (controller.selectedEvents.length == 1 &&
controller.selectedEvents.single.messageType == MessageTypes.Text)
// Pangea#
IconButton(
icon: const Icon(Icons.copy_outlined),
tooltip: L10n.of(context)!.copy,
onPressed: controller.copyEventsAction,
),
if (controller.canSaveSelectedEvent)
// Use builder context to correctly position the share dialog on iPad
Builder(
Expand Down Expand Up @@ -116,8 +120,10 @@ class ChatView extends StatelessWidget {
// #Pangea
} else {
return [
ChatSettingsPopupMenu(controller.room,
(!controller.room.isDirectChat && !controller.room.isArchived)),
ChatSettingsPopupMenu(
controller.room,
(!controller.room.isDirectChat && !controller.room.isArchived),
),
];
}

Expand Down

0 comments on commit ffe49bd

Please sign in to comment.