Merge remote-tracking branch 'upstream/main'

This commit is contained in:
adbenitez
2024-01-31 09:36:06 -05:00
@@ -124,6 +124,18 @@ public class QrShowFragment extends Fragment implements DcEventCenter.DcEventDel
}
}
public void shareInviteURL() {
try {
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
String inviteURL = Util.QrDataToInviteURL(dcContext.getSecurejoinQr(chatId));
intent.putExtra(Intent.EXTRA_TEXT, inviteURL);
startActivity(Intent.createChooser(intent, getString(R.string.chat_share_with_title)));
} catch (Exception e) {
Log.e(TAG, "failed to share invite URL", e);
}
}
public void copyQrData() {
String inviteURL = Util.QrDataToInviteURL(dcContext.getSecurejoinQr(chatId));
Util.writeTextToClipboard(getActivity(), inviteURL);