mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +00:00
feat: move the share intents in settings to a chooser
This commit is contained in:
parent
0b51b8f0b3
commit
abed19dd9c
@ -27,14 +27,12 @@ import nl.komponents.kovenant.ui.alwaysUi
|
|||||||
import nl.komponents.kovenant.ui.successUi
|
import nl.komponents.kovenant.ui.successUi
|
||||||
import org.session.libsession.avatars.AvatarHelper
|
import org.session.libsession.avatars.AvatarHelper
|
||||||
import org.session.libsession.utilities.Address
|
import org.session.libsession.utilities.Address
|
||||||
|
import org.session.libsession.utilities.ProfileKeyUtil
|
||||||
import org.session.libsession.utilities.ProfilePictureUtilities
|
import org.session.libsession.utilities.ProfilePictureUtilities
|
||||||
import org.session.libsession.utilities.SSKEnvironment.ProfileManagerProtocol
|
import org.session.libsession.utilities.SSKEnvironment.ProfileManagerProtocol
|
||||||
import org.session.libsession.utilities.TextSecurePreferences
|
import org.session.libsession.utilities.TextSecurePreferences
|
||||||
import org.session.libsession.utilities.ProfileKeyUtil
|
|
||||||
import org.thoughtcrime.securesms.ApplicationContext
|
|
||||||
import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity
|
import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity
|
||||||
import org.thoughtcrime.securesms.avatar.AvatarSelection
|
import org.thoughtcrime.securesms.avatar.AvatarSelection
|
||||||
import org.thoughtcrime.securesms.database.DatabaseFactory
|
|
||||||
import org.thoughtcrime.securesms.loki.dialogs.ChangeUiModeDialog
|
import org.thoughtcrime.securesms.loki.dialogs.ChangeUiModeDialog
|
||||||
import org.thoughtcrime.securesms.loki.dialogs.ClearAllDataDialog
|
import org.thoughtcrime.securesms.loki.dialogs.ClearAllDataDialog
|
||||||
import org.thoughtcrime.securesms.loki.dialogs.SeedDialog
|
import org.thoughtcrime.securesms.loki.dialogs.SeedDialog
|
||||||
@ -260,7 +258,8 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
|||||||
intent.action = Intent.ACTION_SEND
|
intent.action = Intent.ACTION_SEND
|
||||||
intent.putExtra(Intent.EXTRA_TEXT, hexEncodedPublicKey)
|
intent.putExtra(Intent.EXTRA_TEXT, hexEncodedPublicKey)
|
||||||
intent.type = "text/plain"
|
intent.type = "text/plain"
|
||||||
startActivity(intent)
|
val chooser = Intent.createChooser(intent, getString(R.string.share))
|
||||||
|
startActivity(chooser)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showPrivacySettings() {
|
private fun showPrivacySettings() {
|
||||||
@ -284,7 +283,8 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
|||||||
val invitation = "Hey, I've been using Session to chat with complete privacy and security. Come join me! Download it at https://getsession.org/. My Session ID is $hexEncodedPublicKey!"
|
val invitation = "Hey, I've been using Session to chat with complete privacy and security. Come join me! Download it at https://getsession.org/. My Session ID is $hexEncodedPublicKey!"
|
||||||
intent.putExtra(Intent.EXTRA_TEXT, invitation)
|
intent.putExtra(Intent.EXTRA_TEXT, invitation)
|
||||||
intent.type = "text/plain"
|
intent.type = "text/plain"
|
||||||
startActivity(intent)
|
val chooser = Intent.createChooser(intent, getString(R.string.share))
|
||||||
|
startActivity(chooser)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun helpTranslate() {
|
private fun helpTranslate() {
|
||||||
|
Loading…
Reference in New Issue
Block a user