mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
Rename sendInvitationToUseSession
This commit is contained in:
parent
5459b1eb1d
commit
5ede4a5776
@ -31,7 +31,7 @@ import dagger.hilt.android.AndroidEntryPoint
|
||||
import network.loki.messenger.R
|
||||
import org.session.libsession.utilities.TextSecurePreferences
|
||||
import org.thoughtcrime.securesms.preferences.copyPublicKey
|
||||
import org.thoughtcrime.securesms.preferences.sendInvitation
|
||||
import org.thoughtcrime.securesms.preferences.sendInvitationToUseSession
|
||||
import org.thoughtcrime.securesms.ui.AppTheme
|
||||
import org.thoughtcrime.securesms.ui.classicDarkColors
|
||||
import org.thoughtcrime.securesms.ui.components.AppBar
|
||||
@ -56,7 +56,7 @@ class InviteFriendFragment : Fragment() {
|
||||
onBack = { delegate.onDialogBackPressed() },
|
||||
onClose = { delegate.onDialogClosePressed() },
|
||||
copyPublicKey = requireContext()::copyPublicKey,
|
||||
sendInvitation = requireContext()::sendInvitation,
|
||||
sendInvitation = requireContext()::sendInvitationToUseSession,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ import android.view.View
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.Toast
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
@ -82,7 +81,6 @@ import org.thoughtcrime.securesms.ui.ItemButton
|
||||
import org.thoughtcrime.securesms.ui.ItemButtonWithDrawable
|
||||
import org.thoughtcrime.securesms.ui.components.OutlineButton
|
||||
import org.thoughtcrime.securesms.ui.components.OutlineTemporaryStateButton
|
||||
import org.thoughtcrime.securesms.ui.components.TemporaryStateButton
|
||||
import org.thoughtcrime.securesms.ui.contentDescription
|
||||
import org.thoughtcrime.securesms.ui.destructiveButtonColors
|
||||
import org.thoughtcrime.securesms.util.BitmapDecodingException
|
||||
@ -397,7 +395,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
||||
) {
|
||||
OutlineButton(
|
||||
modifier = Modifier.weight(1f),
|
||||
onClick = { sendInvitation() }
|
||||
onClick = { sendInvitationToUseSession() }
|
||||
) {
|
||||
Text(stringResource(R.string.share))
|
||||
}
|
||||
@ -433,7 +431,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
||||
Divider()
|
||||
ItemButton(R.string.activity_settings_message_appearance_button_title, icon = R.drawable.ic_appearance, contentDescription = R.string.AccessibilityId_appearance) { show<AppearanceSettingsActivity>() }
|
||||
Divider()
|
||||
ItemButton(R.string.activity_settings_invite_button_title, icon = R.drawable.ic_invite_friend, contentDescription = R.string.AccessibilityId_invite_friend) { sendInvitation() }
|
||||
ItemButton(R.string.activity_settings_invite_button_title, icon = R.drawable.ic_invite_friend, contentDescription = R.string.AccessibilityId_invite_friend) { sendInvitationToUseSession() }
|
||||
Divider()
|
||||
if (!prefs.getHidePassword()) {
|
||||
ItemButton(R.string.sessionRecoveryPassword, icon = R.drawable.ic_recovery_phrase, contentDescription = R.string.AccessibilityId_recovery_password_menu_item) { show<RecoveryPasswordActivity>() }
|
||||
|
@ -8,14 +8,14 @@ import android.widget.Toast
|
||||
import network.loki.messenger.R
|
||||
import org.session.libsession.utilities.TextSecurePreferences
|
||||
|
||||
fun Context.sendInvitation() {
|
||||
fun Context.sendInvitationToUseSession() {
|
||||
Intent().apply {
|
||||
action = Intent.ACTION_SEND
|
||||
putExtra(
|
||||
Intent.EXTRA_TEXT,
|
||||
getString(
|
||||
R.string.accountIdShare,
|
||||
TextSecurePreferences.getLocalNumber(this@sendInvitation)
|
||||
TextSecurePreferences.getLocalNumber(this@sendInvitationToUseSession)
|
||||
)
|
||||
)
|
||||
type = "text/plain"
|
||||
|
Loading…
Reference in New Issue
Block a user