mirror of
https://github.com/element-hq/element-android
synced 2024-11-26 19:35:42 +03:00
Add a way to get the access token from the advances settings.
This commit is contained in:
parent
5ee3ae5eea
commit
56986c3a77
3 changed files with 18 additions and 0 deletions
|
@ -3501,4 +3501,7 @@
|
|||
<string name="message_reply_to_sender_sent_video">sent a video.</string>
|
||||
<string name="message_reply_to_sender_sent_sticker">sent a sticker.</string>
|
||||
<string name="message_reply_to_sender_created_poll">created a poll.</string>
|
||||
|
||||
<string name="settings_access_token">Access Token</string>
|
||||
<string name="settings_access_token_summary">Your access token gives full access to your account. Do not share it with anyone.</string>
|
||||
</resources>
|
||||
|
|
|
@ -25,6 +25,7 @@ import im.vector.app.core.platform.VectorBaseActivity
|
|||
import im.vector.app.core.preference.VectorPreference
|
||||
import im.vector.app.core.preference.VectorPreferenceCategory
|
||||
import im.vector.app.core.preference.VectorSwitchPreference
|
||||
import im.vector.app.core.utils.copyToClipboard
|
||||
import im.vector.app.features.analytics.plan.MobileScreen
|
||||
import im.vector.app.features.home.NightlyProxy
|
||||
import im.vector.app.features.rageshake.RageShake
|
||||
|
@ -64,6 +65,14 @@ class VectorSettingsAdvancedSettingsFragment :
|
|||
override fun bindPref() {
|
||||
setupRageShakeSection()
|
||||
setupNightlySection()
|
||||
setupDevToolsSection()
|
||||
}
|
||||
|
||||
private fun setupDevToolsSection() {
|
||||
findPreference<VectorPreference>("SETTINGS_ACCESS_TOKEN")?.setOnPreferenceClickListener {
|
||||
copyToClipboard(requireActivity(), session.sessionParams.credentials.accessToken)
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupRageShakeSection() {
|
||||
|
|
|
@ -93,6 +93,12 @@
|
|||
android:title="@string/settings_key_requests"
|
||||
app:fragment="im.vector.app.features.settings.devtools.KeyRequestsFragment" />
|
||||
|
||||
<im.vector.app.core.preference.VectorPreference
|
||||
android:key="SETTINGS_ACCESS_TOKEN"
|
||||
android:persistent="false"
|
||||
android:summary="@string/settings_access_token_summary"
|
||||
android:title="@string/settings_access_token" />
|
||||
|
||||
</im.vector.app.core.preference.VectorPreferenceCategory>
|
||||
|
||||
<im.vector.app.core.preference.VectorPreferenceCategory
|
||||
|
|
Loading…
Reference in a new issue