diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/LinkDeviceActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/LinkDeviceActivity.kt index 20f8fcf795..ec2a76e760 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/LinkDeviceActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/LinkDeviceActivity.kt @@ -22,17 +22,17 @@ import kotlinx.coroutines.flow.collect import kotlinx.coroutines.flow.filter import kotlinx.coroutines.launch import network.loki.messenger.R +import org.session.libsession.utilities.KeyPairUtilities import org.session.libsession.utilities.TextSecurePreferences -import org.session.libsignal.utilities.KeyHelper import org.session.libsignal.crypto.MnemonicCodec -import org.session.libsignal.utilities.hexEncodedPublicKey import org.session.libsignal.utilities.Hex +import org.session.libsignal.utilities.KeyHelper import org.session.libsignal.utilities.Log +import org.session.libsignal.utilities.hexEncodedPublicKey import org.thoughtcrime.securesms.ApplicationContext import org.thoughtcrime.securesms.BaseActionBarActivity import org.thoughtcrime.securesms.loki.fragments.ScanQRCodeWrapperFragment import org.thoughtcrime.securesms.loki.fragments.ScanQRCodeWrapperFragmentDelegate -import org.session.libsession.utilities.KeyPairUtilities import org.thoughtcrime.securesms.loki.utilities.MnemonicUtilities import org.thoughtcrime.securesms.loki.utilities.push import org.thoughtcrime.securesms.loki.utilities.setUpActionBarSessionLogo @@ -157,7 +157,7 @@ private class LinkDeviceActivityAdapter(private val activity: LinkDeviceActivity 1 -> { val result = ScanQRCodeWrapperFragment() result.delegate = activity - result.message = "Navigate to Settings → Recovery Phrase on your other device to show your QR code." + result.message = activity.getString(R.string.activity_link_device_qr_message) result } else -> throw IllegalStateException() @@ -166,8 +166,8 @@ private class LinkDeviceActivityAdapter(private val activity: LinkDeviceActivity override fun getPageTitle(index: Int): CharSequence { return when (index) { - 0 -> "Recovery Phrase" - 1 -> "Scan QR Code" + 0 -> activity.getString(R.string.activity_link_device_recovery_phrase) + 1 -> activity.getString(R.string.activity_link_device_scan_qr_code) else -> throw IllegalStateException() } } diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/PathActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/PathActivity.kt index f7e91da108..2a06562bdf 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/PathActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/PathActivity.kt @@ -7,7 +7,6 @@ import android.content.IntentFilter import android.net.Uri import android.os.Bundle import android.os.Handler -import androidx.localbroadcastmanager.content.LocalBroadcastManager import android.util.AttributeSet import android.util.TypedValue import android.view.Gravity @@ -17,14 +16,15 @@ import android.widget.RelativeLayout import android.widget.TextView import android.widget.Toast import androidx.annotation.ColorRes +import androidx.localbroadcastmanager.content.LocalBroadcastManager import kotlinx.android.synthetic.main.activity_path.* import network.loki.messenger.R import org.session.libsession.snode.OnionRequestAPI +import org.session.libsignal.utilities.Snode import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity import org.thoughtcrime.securesms.loki.utilities.* import org.thoughtcrime.securesms.loki.views.GlowViewUtilities import org.thoughtcrime.securesms.loki.views.PathDotView -import org.session.libsignal.utilities.Snode class PathActivity : PassphraseRequiredActionBarActivity() { private val broadcastReceivers = mutableListOf() @@ -148,9 +148,9 @@ class PathActivity : PassphraseRequiredActionBarActivity() { private fun getPathRow(snode: Snode, location: LineView.Location, dotAnimationStartDelay: Long, dotAnimationRepeatInterval: Long, isGuardSnode: Boolean): LinearLayout { val title = if (isGuardSnode) resources.getString(R.string.activity_path_guard_node_row_title) else resources.getString(R.string.activity_path_service_node_row_title) val subtitle = if (IP2Country.isInitialized) { - IP2Country.shared.countryNamesCache[snode.ip] ?: "Resolving..." + IP2Country.shared.countryNamesCache[snode.ip] ?: resources.getString(R.string.activity_path_resolving_progress) } else { - "Resolving..." + resources.getString(R.string.activity_path_resolving_progress) } return getPathRow(title, subtitle, location, dotAnimationStartDelay, dotAnimationRepeatInterval) } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b8d6c578d4..940ea443d8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -713,6 +713,7 @@ Service Node Destination Learn More + Resolving… New Session Enter Session ID @@ -765,6 +766,8 @@ Chats Notification Strategy + Use Fast Mode + You’ll be notified of new messages reliably and immediately using Google’s notification servers. Change name Unlink device @@ -828,6 +831,9 @@ This is taking a while, would you like to skip? Link a Device + Recovery Phrase + Scan QR Code + Navigate to Settings → Recovery Phrase on your other device to show your QR code. Or join one of these… Message Notifications diff --git a/app/src/main/res/xml/preferences_notifications.xml b/app/src/main/res/xml/preferences_notifications.xml index 76fff3f6d6..d2a299d9a7 100644 --- a/app/src/main/res/xml/preferences_notifications.xml +++ b/app/src/main/res/xml/preferences_notifications.xml @@ -26,8 +26,8 @@