From 56848fb83da1086374ee0cfca47e620c5056434f Mon Sep 17 00:00:00 2001 From: Alan Evans Date: Thu, 23 May 2019 08:02:15 -0300 Subject: [PATCH] Replace sgnl.link urls with a more readable url. * Taken out random string, reverted to single "Let's switch". #8767 --- res/values/strings.xml | 4 +++- src/org/thoughtcrime/securesms/InviteActivity.java | 2 +- .../contactshare/SharedContactDetailsActivity.java | 2 +- .../securesms/conversation/ConversationActivity.java | 7 +------ .../securesms/conversation/ConversationFragment.java | 2 +- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 19dc61e607..72d294034c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1,6 +1,9 @@ Signal + + https://signal.org/install + Yes No Delete @@ -158,7 +161,6 @@ Insecure MMS Signal Let\'s switch to Signal %1$s - Let\'s use this to chat: %1$s Error leaving group Please choose a contact Unblock this contact? diff --git a/src/org/thoughtcrime/securesms/InviteActivity.java b/src/org/thoughtcrime/securesms/InviteActivity.java index 74a5478f4d..411fbc337f 100644 --- a/src/org/thoughtcrime/securesms/InviteActivity.java +++ b/src/org/thoughtcrime/securesms/InviteActivity.java @@ -76,7 +76,7 @@ public class InviteActivity extends PassphraseRequiredActionBarActivity implemen heart = ViewUtil.findById(this, R.id.heart); contactsFragment = (ContactSelectionListFragment)getSupportFragmentManager().findFragmentById(R.id.contact_selection_list_fragment); - inviteText.setText(getString(R.string.InviteActivity_lets_switch_to_signal, "https://sgnl.link/1KpeYmF")); + inviteText.setText(getString(R.string.InviteActivity_lets_switch_to_signal, getString(R.string.install_url))); updateSmsButtonText(); if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { diff --git a/src/org/thoughtcrime/securesms/contactshare/SharedContactDetailsActivity.java b/src/org/thoughtcrime/securesms/contactshare/SharedContactDetailsActivity.java index 178364a757..80f0024ddf 100644 --- a/src/org/thoughtcrime/securesms/contactshare/SharedContactDetailsActivity.java +++ b/src/org/thoughtcrime/securesms/contactshare/SharedContactDetailsActivity.java @@ -230,7 +230,7 @@ public class SharedContactDetailsActivity extends PassphraseRequiredActionBarAct inviteButtonView.setOnClickListener(v -> { ContactUtil.selectRecipientThroughDialog(this, systemUsers, dynamicLanguage.getCurrentLocale(), recipient -> { - CommunicationActions.composeSmsThroughDefaultApp(this, recipient.getAddress(), getString(R.string.InviteActivity_lets_switch_to_signal, "https://sgnl.link/1KpeYmF")); + CommunicationActions.composeSmsThroughDefaultApp(this, recipient.getAddress(), getString(R.string.InviteActivity_lets_switch_to_signal, getString(R.string.install_url))); }); }); } else { diff --git a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java index bc8a4fc74f..465bc7ec9f 100644 --- a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java @@ -210,7 +210,6 @@ import org.whispersystems.libsignal.InvalidMessageException; import org.whispersystems.libsignal.util.guava.Optional; import java.io.IOException; -import java.security.SecureRandom; import java.text.SimpleDateFormat; import java.util.Collections; import java.util.Date; @@ -874,11 +873,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity } private void handleInviteLink() { - String inviteText; - - boolean a = new SecureRandom().nextBoolean(); - if (a) inviteText = getString(R.string.ConversationActivity_lets_switch_to_signal, "https://sgnl.link/1LoIMUl"); - else inviteText = getString(R.string.ConversationActivity_lets_use_this_to_chat, "https://sgnl.link/1MF56H1"); + String inviteText = getString(R.string.ConversationActivity_lets_switch_to_signal, getString(R.string.install_url)); if (isDefaultSms) { composeText.appendInvite(inviteText); diff --git a/src/org/thoughtcrime/securesms/conversation/ConversationFragment.java b/src/org/thoughtcrime/securesms/conversation/ConversationFragment.java index 377bfc6a50..9b33b93d6c 100644 --- a/src/org/thoughtcrime/securesms/conversation/ConversationFragment.java +++ b/src/org/thoughtcrime/securesms/conversation/ConversationFragment.java @@ -980,7 +980,7 @@ public class ConversationFragment extends Fragment if (getContext() == null) return; ContactUtil.selectRecipientThroughDialog(getContext(), choices, locale, recipient -> { - CommunicationActions.composeSmsThroughDefaultApp(getContext(), recipient.getAddress(), getString(R.string.InviteActivity_lets_switch_to_signal, "https://sgnl.link/1KpeYmF")); + CommunicationActions.composeSmsThroughDefaultApp(getContext(), recipient.getAddress(), getString(R.string.InviteActivity_lets_switch_to_signal, getString(R.string.install_url))); }); } }