mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-03 15:05:24 +00:00
minor fix
This commit is contained in:
parent
4f7d26d86e
commit
e8c52961aa
@ -20,6 +20,7 @@ import kotlinx.android.synthetic.main.activity_create_private_chat.viewPager
|
||||
import kotlinx.android.synthetic.main.fragment_enter_public_key.*
|
||||
import network.loki.messenger.R
|
||||
import nl.komponents.kovenant.ui.failUi
|
||||
import nl.komponents.kovenant.ui.successUi
|
||||
import org.session.libsession.snode.SnodeAPI
|
||||
import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity
|
||||
import org.thoughtcrime.securesms.conversation.ConversationActivity
|
||||
@ -89,12 +90,12 @@ class CreatePrivateChatActivity : PassphraseRequiredActionBarActivity(), ScanQRC
|
||||
} else {
|
||||
// This could be an ONS name
|
||||
showLoader()
|
||||
SnodeAPI.getSessionIDFor(onsNameOrPublicKey).success { hexEncodedPublicKey ->
|
||||
SnodeAPI.getSessionIDFor(onsNameOrPublicKey).successUi { hexEncodedPublicKey ->
|
||||
hideLoader()
|
||||
this.createPrivateChat(hexEncodedPublicKey)
|
||||
}.failUi { exception ->
|
||||
hideLoader()
|
||||
var message = "Please check the Session ID or ONS name and try again."
|
||||
var message = resources.getString(R.string.fragment_enter_public_key_error_message)
|
||||
exception.localizedMessage?.let {
|
||||
message = it
|
||||
}
|
||||
|
@ -721,6 +721,7 @@
|
||||
|
||||
<string name="fragment_enter_public_key_edit_text_hint">Enter Session ID or ONS name</string>
|
||||
<string name="fragment_enter_public_key_explanation">Users can share their Session ID by going into their account settings and tapping "Share Session ID", or by sharing their QR code.</string>
|
||||
<string name="fragment_enter_public_key_error_message">Please check the Session ID or ONS name and try again.</string>
|
||||
|
||||
<string name="fragment_scan_qr_code_camera_access_explanation">Session needs camera access to scan QR codes</string>
|
||||
<string name="fragment_scan_qr_code_grant_camera_access_button_title">Grant Camera Access</string>
|
||||
|
@ -183,7 +183,10 @@ object SnodeAPI {
|
||||
)
|
||||
val promises = (1..validationCount).map {
|
||||
getRandomSnode().bind { snode ->
|
||||
invoke(Snode.Method.OxenDaemonRPCCall, snode, null, parameters)
|
||||
retryIfNeeded(maxRetryCount) {
|
||||
invoke(Snode.Method.OxenDaemonRPCCall, snode, null, parameters)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
all(promises).success { results ->
|
||||
|
Loading…
Reference in New Issue
Block a user