Rename sendInvitationToUseSession

This commit is contained in:
Andrew 2024-06-07 17:42:44 +09:30
parent 5459b1eb1d
commit 5ede4a5776
3 changed files with 6 additions and 8 deletions

View File

@ -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,
)
}
}

View File

@ -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>() }

View File

@ -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"