mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-26 17:57:42 +00:00
feat: extracting QR related strings and other github mentioned strings
This commit is contained in:
parent
de45ec584d
commit
5ce28f976b
@ -22,17 +22,17 @@ import kotlinx.coroutines.flow.collect
|
|||||||
import kotlinx.coroutines.flow.filter
|
import kotlinx.coroutines.flow.filter
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import network.loki.messenger.R
|
import network.loki.messenger.R
|
||||||
|
import org.session.libsession.utilities.KeyPairUtilities
|
||||||
import org.session.libsession.utilities.TextSecurePreferences
|
import org.session.libsession.utilities.TextSecurePreferences
|
||||||
import org.session.libsignal.utilities.KeyHelper
|
|
||||||
import org.session.libsignal.crypto.MnemonicCodec
|
import org.session.libsignal.crypto.MnemonicCodec
|
||||||
import org.session.libsignal.utilities.hexEncodedPublicKey
|
|
||||||
import org.session.libsignal.utilities.Hex
|
import org.session.libsignal.utilities.Hex
|
||||||
|
import org.session.libsignal.utilities.KeyHelper
|
||||||
import org.session.libsignal.utilities.Log
|
import org.session.libsignal.utilities.Log
|
||||||
|
import org.session.libsignal.utilities.hexEncodedPublicKey
|
||||||
import org.thoughtcrime.securesms.ApplicationContext
|
import org.thoughtcrime.securesms.ApplicationContext
|
||||||
import org.thoughtcrime.securesms.BaseActionBarActivity
|
import org.thoughtcrime.securesms.BaseActionBarActivity
|
||||||
import org.thoughtcrime.securesms.loki.fragments.ScanQRCodeWrapperFragment
|
import org.thoughtcrime.securesms.loki.fragments.ScanQRCodeWrapperFragment
|
||||||
import org.thoughtcrime.securesms.loki.fragments.ScanQRCodeWrapperFragmentDelegate
|
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.MnemonicUtilities
|
||||||
import org.thoughtcrime.securesms.loki.utilities.push
|
import org.thoughtcrime.securesms.loki.utilities.push
|
||||||
import org.thoughtcrime.securesms.loki.utilities.setUpActionBarSessionLogo
|
import org.thoughtcrime.securesms.loki.utilities.setUpActionBarSessionLogo
|
||||||
@ -166,8 +166,8 @@ private class LinkDeviceActivityAdapter(private val activity: LinkDeviceActivity
|
|||||||
|
|
||||||
override fun getPageTitle(index: Int): CharSequence {
|
override fun getPageTitle(index: Int): CharSequence {
|
||||||
return when (index) {
|
return when (index) {
|
||||||
0 -> "Recovery Phrase"
|
0 -> activity.getString(R.string.fragment_recovery_phrase_title)
|
||||||
1 -> "Scan QR Code"
|
1 -> activity.getString(R.string.activity_qr_code_view_scan_qr_code_tab_title)
|
||||||
else -> throw IllegalStateException()
|
else -> throw IllegalStateException()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ import android.content.IntentFilter
|
|||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.util.TypedValue
|
import android.util.TypedValue
|
||||||
import android.view.Gravity
|
import android.view.Gravity
|
||||||
@ -17,14 +16,15 @@ import android.widget.RelativeLayout
|
|||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.annotation.ColorRes
|
import androidx.annotation.ColorRes
|
||||||
|
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
||||||
import kotlinx.android.synthetic.main.activity_path.*
|
import kotlinx.android.synthetic.main.activity_path.*
|
||||||
import network.loki.messenger.R
|
import network.loki.messenger.R
|
||||||
import org.session.libsession.snode.OnionRequestAPI
|
import org.session.libsession.snode.OnionRequestAPI
|
||||||
|
import org.session.libsignal.utilities.Snode
|
||||||
import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity
|
import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity
|
||||||
import org.thoughtcrime.securesms.loki.utilities.*
|
import org.thoughtcrime.securesms.loki.utilities.*
|
||||||
import org.thoughtcrime.securesms.loki.views.GlowViewUtilities
|
import org.thoughtcrime.securesms.loki.views.GlowViewUtilities
|
||||||
import org.thoughtcrime.securesms.loki.views.PathDotView
|
import org.thoughtcrime.securesms.loki.views.PathDotView
|
||||||
import org.session.libsignal.utilities.Snode
|
|
||||||
|
|
||||||
class PathActivity : PassphraseRequiredActionBarActivity() {
|
class PathActivity : PassphraseRequiredActionBarActivity() {
|
||||||
private val broadcastReceivers = mutableListOf<BroadcastReceiver>()
|
private val broadcastReceivers = mutableListOf<BroadcastReceiver>()
|
||||||
@ -148,9 +148,9 @@ class PathActivity : PassphraseRequiredActionBarActivity() {
|
|||||||
private fun getPathRow(snode: Snode, location: LineView.Location, dotAnimationStartDelay: Long, dotAnimationRepeatInterval: Long, isGuardSnode: Boolean): LinearLayout {
|
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 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) {
|
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 {
|
} else {
|
||||||
"Resolving..."
|
resources.getString(R.string.activity_path_resolving_progress)
|
||||||
}
|
}
|
||||||
return getPathRow(title, subtitle, location, dotAnimationStartDelay, dotAnimationRepeatInterval)
|
return getPathRow(title, subtitle, location, dotAnimationStartDelay, dotAnimationRepeatInterval)
|
||||||
}
|
}
|
||||||
|
@ -713,6 +713,7 @@
|
|||||||
<string name="activity_path_service_node_row_title">Service Node</string>
|
<string name="activity_path_service_node_row_title">Service Node</string>
|
||||||
<string name="activity_path_destination_row_title">Destination</string>
|
<string name="activity_path_destination_row_title">Destination</string>
|
||||||
<string name="activity_path_learn_more_button_title">Learn More</string>
|
<string name="activity_path_learn_more_button_title">Learn More</string>
|
||||||
|
<string name="activity_path_resolving_progress">Resolving…</string>
|
||||||
|
|
||||||
<string name="activity_create_private_chat_title">New Session</string>
|
<string name="activity_create_private_chat_title">New Session</string>
|
||||||
<string name="activity_create_private_chat_enter_session_id_tab_title">Enter Session ID</string>
|
<string name="activity_create_private_chat_enter_session_id_tab_title">Enter Session ID</string>
|
||||||
@ -765,6 +766,8 @@
|
|||||||
<string name="activity_chat_settings_title">Chats</string>
|
<string name="activity_chat_settings_title">Chats</string>
|
||||||
|
|
||||||
<string name="preferences_notifications_strategy_category_title">Notification Strategy</string>
|
<string name="preferences_notifications_strategy_category_title">Notification Strategy</string>
|
||||||
|
<string name="preferences_notifications_strategy_category_fast_mode_title">Use Fast Mode</string>
|
||||||
|
<string name="preferences_notifications_strategy_category_fast_mode_summary">You’ll be notified of new messages reliably and immediately using Google’s notification servers.</string>
|
||||||
|
|
||||||
<string name="fragment_device_list_bottom_sheet_change_name_button_title">Change name</string>
|
<string name="fragment_device_list_bottom_sheet_change_name_button_title">Change name</string>
|
||||||
<string name="fragment_device_list_bottom_sheet_unlink_device_button_title">Unlink device</string>
|
<string name="fragment_device_list_bottom_sheet_unlink_device_button_title">Unlink device</string>
|
||||||
|
@ -26,8 +26,8 @@
|
|||||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||||
android:dependency="pref_key_enable_notifications"
|
android:dependency="pref_key_enable_notifications"
|
||||||
android:key="pref_key_use_fcm"
|
android:key="pref_key_use_fcm"
|
||||||
android:title="Use Fast Mode"
|
android:title="@string/preferences_notifications_strategy_category_fast_mode_title"
|
||||||
android:summary="You’ll be notified of new messages reliably and immediately using Google’s notification servers."
|
android:summary="@string/preferences_notifications_strategy_category_fast_mode_summary"
|
||||||
android:defaultValue="false" />
|
android:defaultValue="false" />
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user