append invite link to message draft instead of overwrite it.

Fixes #2583
// FREEBIE
pull/1/head
Rhodey Orbits 10 years ago committed by Moxie Marlinspike
parent 3a19ac432b
commit 76d0f45b9b

@ -343,9 +343,14 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
private void handleInviteLink() {
try {
if (!TextUtils.isEmpty(composeText.getText()) &&
!composeText.getText().toString().endsWith(" "))
{
composeText.append(" ");
}
boolean a = SecureRandom.getInstance("SHA1PRNG").nextBoolean();
if (a) composeText.setText(getString(R.string.ConversationActivity_get_with_it, "http://sgnl.link/zhrzvk6"));
else composeText.setText(getString(R.string.ConversationActivity_install_textsecure, "http://sgnl.link/1yKYqoN"));
if (a) composeText.append(getString(R.string.ConversationActivity_get_with_it, "http://sgnl.link/zhrzvk6"));
else composeText.append(getString(R.string.ConversationActivity_install_textsecure, "http://sgnl.link/1yKYqoN"));
} catch (NoSuchAlgorithmException e) {
throw new AssertionError(e);
}

Loading…
Cancel
Save