mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Add FAQ button to settings
This commit is contained in:
parent
f06f4a1a8f
commit
b25feb221a
@ -84,6 +84,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
|||||||
notificationsButton.setOnClickListener { showNotificationSettings() }
|
notificationsButton.setOnClickListener { showNotificationSettings() }
|
||||||
chatsButton.setOnClickListener { showChatSettings() }
|
chatsButton.setOnClickListener { showChatSettings() }
|
||||||
sendInvitationButton.setOnClickListener { sendInvitation() }
|
sendInvitationButton.setOnClickListener { sendInvitation() }
|
||||||
|
faqButton.setOnClickListener { showFAQ() }
|
||||||
helpTranslateButton.setOnClickListener { helpTranslate() }
|
helpTranslateButton.setOnClickListener { helpTranslate() }
|
||||||
seedButton.setOnClickListener { showSeed() }
|
seedButton.setOnClickListener { showSeed() }
|
||||||
clearAllDataButton.setOnClickListener { clearAllData() }
|
clearAllDataButton.setOnClickListener { clearAllData() }
|
||||||
@ -224,7 +225,6 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
|||||||
Toast.makeText(this, R.string.activity_settings_display_name_too_long_error, Toast.LENGTH_SHORT).show()
|
Toast.makeText(this, R.string.activity_settings_display_name_too_long_error, Toast.LENGTH_SHORT).show()
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
// isEditingDisplayName = false
|
|
||||||
displayNameToBeUploaded = displayName
|
displayNameToBeUploaded = displayName
|
||||||
updateProfile(false)
|
updateProfile(false)
|
||||||
return true
|
return true
|
||||||
@ -238,11 +238,11 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
|||||||
private fun showEditProfilePictureUI() {
|
private fun showEditProfilePictureUI() {
|
||||||
// Ask for an optional camera permission.
|
// Ask for an optional camera permission.
|
||||||
Permissions.with(this)
|
Permissions.with(this)
|
||||||
.request(Manifest.permission.CAMERA)
|
.request(Manifest.permission.CAMERA)
|
||||||
.onAnyResult {
|
.onAnyResult {
|
||||||
tempFile = AvatarSelection.startAvatarSelection(this, false, true)
|
tempFile = AvatarSelection.startAvatarSelection(this, false, true)
|
||||||
}
|
}
|
||||||
.execute()
|
.execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun copyPublicKey() {
|
private fun copyPublicKey() {
|
||||||
@ -286,6 +286,16 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
|||||||
startActivity(chooser)
|
startActivity(chooser)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun showFAQ() {
|
||||||
|
try {
|
||||||
|
val url = "https://getsession.org/faq"
|
||||||
|
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
|
||||||
|
startActivity(intent)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Toast.makeText(this, "Can't open URL", Toast.LENGTH_LONG).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun helpTranslate() {
|
private fun helpTranslate() {
|
||||||
try {
|
try {
|
||||||
val url = "https://crowdin.com/project/session-android"
|
val url = "https://crowdin.com/project/session-android"
|
||||||
|
@ -202,6 +202,17 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/activity_settings_invite_button_title" />
|
android:text="@string/activity_settings_invite_button_title" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/faqButton"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/medium_spacing"
|
||||||
|
android:textColor="@color/text"
|
||||||
|
android:textSize="@dimen/medium_font_size"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/activity_settings_faq_button_title" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/helpTranslateButton"
|
android:id="@+id/helpTranslateButton"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -755,6 +755,7 @@
|
|||||||
<string name="activity_settings_chats_button_title">Chats</string>
|
<string name="activity_settings_chats_button_title">Chats</string>
|
||||||
<string name="activity_settings_devices_button_title">Devices</string>
|
<string name="activity_settings_devices_button_title">Devices</string>
|
||||||
<string name="activity_settings_invite_button_title">Invite</string>
|
<string name="activity_settings_invite_button_title">Invite</string>
|
||||||
|
<string name="activity_settings_faq_button_title">FAQ</string>
|
||||||
<string name="activity_settings_recovery_phrase_button_title">Recovery Phrase</string>
|
<string name="activity_settings_recovery_phrase_button_title">Recovery Phrase</string>
|
||||||
<string name="activity_settings_clear_all_data_button_title">Clear Data</string>
|
<string name="activity_settings_clear_all_data_button_title">Clear Data</string>
|
||||||
<string name="activity_settings_clear_all_data_and_network_button_title">Clear Data Including Network</string>
|
<string name="activity_settings_clear_all_data_and_network_button_title">Clear Data Including Network</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user