mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +00:00
Merge branch 'dev' of github.com:oxen-io/session-android into ui
This commit is contained in:
commit
da0ed31f9b
@ -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()
|
||||
}
|
||||
}
|
||||
|
@ -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<BroadcastReceiver>()
|
||||
@ -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)
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ public class MediaPreviewViewModel extends ViewModel {
|
||||
|
||||
public void setCursor(@NonNull Context context, @Nullable Cursor cursor, boolean leftIsRecent) {
|
||||
boolean firstLoad = (this.cursor == null) && (cursor != null);
|
||||
if (this.cursor != null) {
|
||||
if (this.cursor != null && !this.cursor.equals(cursor)) {
|
||||
this.cursor.close();
|
||||
}
|
||||
this.cursor = cursor;
|
||||
|
@ -713,6 +713,7 @@
|
||||
<string name="activity_path_service_node_row_title">Service Node</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_resolving_progress">Resolving…</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>
|
||||
@ -765,6 +766,8 @@
|
||||
<string name="activity_chat_settings_title">Chats</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_unlink_device_button_title">Unlink device</string>
|
||||
@ -828,6 +831,9 @@
|
||||
|
||||
<string name="activity_link_device_skip_prompt">This is taking a while, would you like to skip?</string>
|
||||
<string name="activity_link_device_link_device">Link a Device</string>
|
||||
<string name="activity_link_device_recovery_phrase">Recovery Phrase</string>
|
||||
<string name="activity_link_device_scan_qr_code">Scan QR Code</string>
|
||||
<string name="activity_link_device_qr_message">Navigate to Settings → Recovery Phrase on your other device to show your QR code.</string>
|
||||
<string name="activity_join_public_chat_join_rooms">Or join one of these…</string>
|
||||
|
||||
<string name="activity_pn_mode_message_notifications">Message Notifications</string>
|
||||
|
@ -26,8 +26,8 @@
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:dependency="pref_key_enable_notifications"
|
||||
android:key="pref_key_use_fcm"
|
||||
android:title="Use Fast Mode"
|
||||
android:summary="You’ll be notified of new messages reliably and immediately using Google’s notification servers."
|
||||
android:title="@string/preferences_notifications_strategy_category_fast_mode_title"
|
||||
android:summary="@string/preferences_notifications_strategy_category_fast_mode_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
Loading…
Reference in New Issue
Block a user