Don't include client hash when copying link

This commit is contained in:
Hillel Coren 2023-11-16 13:30:59 +02:00
parent 0ac19faa35
commit 0d7b1f3b2c
1 changed files with 1 additions and 9 deletions

View File

@ -43,17 +43,9 @@ class PortalLinks extends StatelessWidget {
viewLinkWithHash += '&client_hash=${client!.clientHash}'; viewLinkWithHash += '&client_hash=${client!.clientHash}';
} }
var copyLinkWithHash = copyLink;
if (!copyLink.contains('?')) {
copyLinkWithHash += '?';
}
if (client != null) {
copyLinkWithHash += '&client_hash=${client!.clientHash}';
}
final viewLinkPressed = () => launchUrl(Uri.parse(viewLinkWithHash)); final viewLinkPressed = () => launchUrl(Uri.parse(viewLinkWithHash));
final copyLinkPressed = () { final copyLinkPressed = () {
Clipboard.setData(ClipboardData(text: copyLinkWithHash)); Clipboard.setData(ClipboardData(text: copyLink));
showToast(localization!.copiedToClipboard.replaceFirst(':value ', '')); showToast(localization!.copiedToClipboard.replaceFirst(':value ', ''));
}; };