mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 16:33:39 +00:00
feat: add survey button
This commit is contained in:
parent
ef3d2bb28f
commit
ecf2308e84
@ -33,15 +33,11 @@ import org.session.libsession.utilities.SSKEnvironment.ProfileManagerProtocol
|
||||
import org.session.libsession.utilities.TextSecurePreferences
|
||||
import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity
|
||||
import org.thoughtcrime.securesms.avatar.AvatarSelection
|
||||
import org.thoughtcrime.securesms.util.ConfigurationMessageUtilities
|
||||
import org.thoughtcrime.securesms.util.UiModeUtilities
|
||||
import org.thoughtcrime.securesms.util.push
|
||||
import org.thoughtcrime.securesms.mms.GlideApp
|
||||
import org.thoughtcrime.securesms.mms.GlideRequests
|
||||
import org.thoughtcrime.securesms.permissions.Permissions
|
||||
import org.thoughtcrime.securesms.profiles.ProfileMediaConstraints
|
||||
import org.thoughtcrime.securesms.util.BitmapDecodingException
|
||||
import org.thoughtcrime.securesms.util.BitmapUtil
|
||||
import org.thoughtcrime.securesms.util.*
|
||||
import java.io.File
|
||||
import java.security.SecureRandom
|
||||
import java.util.*
|
||||
@ -85,6 +81,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
||||
chatsButton.setOnClickListener { showChatSettings() }
|
||||
sendInvitationButton.setOnClickListener { sendInvitation() }
|
||||
faqButton.setOnClickListener { showFAQ() }
|
||||
surveyButton.setOnClickListener { showSurvey() }
|
||||
helpTranslateButton.setOnClickListener { helpTranslate() }
|
||||
seedButton.setOnClickListener { showSeed() }
|
||||
clearAllDataButton.setOnClickListener { clearAllData() }
|
||||
@ -296,6 +293,16 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun showSurvey() {
|
||||
try {
|
||||
val url = "https://getsession.org/survey"
|
||||
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() {
|
||||
try {
|
||||
val url = "https://crowdin.com/project/session-android"
|
||||
|
@ -193,6 +193,7 @@
|
||||
android:background="?android:dividerHorizontal" />
|
||||
|
||||
<TextView
|
||||
android:padding="@dimen/small_spacing"
|
||||
android:id="@+id/sendInvitationButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -203,6 +204,7 @@
|
||||
android:text="@string/activity_settings_invite_button_title" />
|
||||
|
||||
<TextView
|
||||
android:padding="@dimen/small_spacing"
|
||||
android:id="@+id/faqButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -214,6 +216,19 @@
|
||||
android:text="@string/activity_settings_faq_button_title" />
|
||||
|
||||
<TextView
|
||||
android:padding="@dimen/small_spacing"
|
||||
android:id="@+id/surveyButton"
|
||||
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_survey_feedback" />
|
||||
|
||||
<TextView
|
||||
android:padding="@dimen/small_spacing"
|
||||
android:id="@+id/helpTranslateButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -897,5 +897,6 @@
|
||||
<string name="delete_message_for_me">Delete just for me</string>
|
||||
<string name="delete_message_for_everyone">Delete for everyone</string>
|
||||
<string name="delete_message_for_me_and_recipient">Delete for me and %s</string>
|
||||
<string name="activity_settings_survey_feedback">Feedback/Survey</string>
|
||||
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user