Commit d17331b5 authored by Torsten Grote's avatar Torsten Grote

[android] Set handshake link when received via sharing intent or link click

parent bec1f117
Pipeline #3259 passed with stage
in 10 minutes and 57 seconds
......@@ -68,6 +68,11 @@ public class AddContactViewModel extends AndroidViewModel {
return handshakeLink;
}
@Nullable
String getRemoteHandshakeLink() {
return remoteHandshakeLink;
}
void setRemoteHandshakeLink(String link) {
remoteHandshakeLink = link;
}
......
......@@ -72,6 +72,10 @@ public class LinkExchangeFragment extends BaseFragment {
linkInputLayout = v.findViewById(R.id.linkInputLayout);
linkInput = v.findViewById(R.id.linkInput);
if (viewModel.getRemoteHandshakeLink() != null) {
// This can happen if the link was set via an incoming Intent
linkInput.setText(viewModel.getRemoteHandshakeLink());
}
clipboard = (ClipboardManager) requireNonNull(
getContext().getSystemService(CLIPBOARD_SERVICE));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment