mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 16:33:39 +00:00
parent
76d0f45b9b
commit
d65a7f1a25
@ -111,7 +111,7 @@
|
||||
<string name="ConversationActivity_transport_insecure_mms">Insecure MMS</string>
|
||||
<string name="ConversationActivity_transport_textsecure">TextSecure</string>
|
||||
<string name="ConversationActivity_get_with_it">Get with it: %s</string>
|
||||
<string name="ConversationActivity_install_textsecure">Install TextSecure: %s</string>
|
||||
<string name="ConversationActivity_lets_use_this_to_chat">Let's use this to chat: %s</string>
|
||||
<string name="ConversationActivity_error_leaving_group">Error leaving group...</string>
|
||||
|
||||
<!-- ConversationFragment -->
|
||||
|
@ -343,14 +343,9 @@ 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.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"));
|
||||
if (a) composeText.appendInvite(getString(R.string.ConversationActivity_get_with_it, "http://sgnl.link/1IvurmD"));
|
||||
else composeText.appendInvite(getString(R.string.ConversationActivity_lets_use_this_to_chat, "sgnl.link/1CYCQQN"));
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import android.os.Build;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableString;
|
||||
import android.text.TextUtils;
|
||||
import android.text.style.RelativeSizeSpan;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.EditText;
|
||||
@ -33,4 +34,12 @@ public class ComposeText extends EditText {
|
||||
span.setSpan(new RelativeSizeSpan(0.8f), 0, hint.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE);
|
||||
super.setHint(span);
|
||||
}
|
||||
|
||||
public void appendInvite(String invite) {
|
||||
if (!TextUtils.isEmpty(getText()) && !getText().toString().equals(" ")) {
|
||||
append(" ");
|
||||
}
|
||||
|
||||
append(invite);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user