Add some description to the proxy settings screen.

fork-5.53.8
Greyson Parrelli 2021-02-03 16:40:21 -05:00
rodzic 26d8df5ea9
commit 94b631ccfe
3 zmienionych plików z 18 dodań i 0 usunięć

Wyświetl plik

@ -23,9 +23,11 @@ import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.contactshare.SimpleTextWatcher;
import org.thoughtcrime.securesms.keyvalue.SignalStore;
import org.thoughtcrime.securesms.net.PipeConnectivityListener;
import org.thoughtcrime.securesms.util.CommunicationActions;
import org.thoughtcrime.securesms.util.SignalProxyUtil;
import org.thoughtcrime.securesms.util.Util;
import org.thoughtcrime.securesms.util.ViewUtil;
import org.thoughtcrime.securesms.util.views.LearnMoreTextView;
import org.whispersystems.libsignal.util.guava.Optional;
import org.whispersystems.signalservice.internal.configuration.SignalProxy;
@ -73,6 +75,10 @@ public class EditProxyFragment extends Fragment {
shareButton.setOnClickListener(v -> onShareClicked());
proxySwitch.setOnCheckedChangeListener((buttonView, isChecked) -> viewModel.onToggleProxy(isChecked));
LearnMoreTextView description = view.findViewById(R.id.edit_proxy_switch_title_description);
description.setLearnMoreVisible(true);
description.setOnLinkClickListener(v -> CommunicationActions.openBrowserLink(requireContext(), "https://support.signal.org/hc/articles/360056052052"));
requireActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
}

Wyświetl plik

@ -17,6 +17,17 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/edit_proxy_switch"/>
<org.thoughtcrime.securesms.util.views.LearnMoreTextView
android:id="@+id/edit_proxy_switch_title_description"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/preferences_only_use_a_proxy_if"
style="@style/Signal.Text.Preview"
android:textColor="@color/signal_text_secondary"
app:layout_constraintTop_toBottomOf="@id/edit_proxy_switch_title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/edit_proxy_switch"/>
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/edit_proxy_switch"
android:layout_width="wrap_content"

Wyświetl plik

@ -2316,6 +2316,7 @@
<string name="preferences_off">Off</string>
<string name="preferences_on">On</string>
<string name="preferences_proxy_address">Proxy address</string>
<string name="preferences_only_use_a_proxy_if">Only use a proxy if you\'re not able to connect to Signal on cellular or Wi-Fi.</string>
<string name="preferences_share">Share</string>
<string name="preferences_save">Save</string>
<string name="preferences_connecting_to_proxy">Connecting to proxy…</string>