mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-12 17:33:39 +00:00
commit
d168f25043
@ -176,6 +176,22 @@
|
||||
android:gravity="center"
|
||||
android:text="@string/activity_settings_devices_button_title" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?android:dividerHorizontal" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sendInvitationButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/setting_button_height"
|
||||
android:background="@drawable/setting_button_background"
|
||||
android:textColor="@color/text"
|
||||
android:textSize="@dimen/medium_font_size"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center"
|
||||
android:text="Invite" />
|
||||
|
||||
<View
|
||||
android:id="@+id/seedButtonTopSeparator"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -96,6 +96,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
||||
notificationsButton.setOnClickListener { showNotificationSettings() }
|
||||
chatsButton.setOnClickListener { showChatSettings() }
|
||||
// linkedDevicesButton.setOnClickListener { showLinkedDevices() }
|
||||
sendInvitationButton.setOnClickListener { sendInvitation() }
|
||||
seedButton.setOnClickListener { showSeed() }
|
||||
clearAllDataButton.setOnClickListener { clearAllData() }
|
||||
versionTextView.text = String.format(getString(R.string.version_s), "${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})")
|
||||
@ -292,6 +293,15 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
||||
push(intent)
|
||||
}
|
||||
|
||||
private fun sendInvitation() {
|
||||
val intent = Intent()
|
||||
intent.action = Intent.ACTION_SEND
|
||||
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.type = "text/plain"
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun showSeed() {
|
||||
SeedDialog().show(supportFragmentManager, "Recovery Phrase Dialog")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user