mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
Ensure unidentified access is correct when fetching own profile.
This commit is contained in:
@@ -55,18 +55,6 @@ class InternalSettingsFragment : DSLSettingsFragment(R.string.preferences__inter
|
||||
|
||||
private fun getConfiguration(state: InternalSettingsState): DSLConfiguration {
|
||||
return configure {
|
||||
sectionHeaderPref(R.string.preferences__internal_payments)
|
||||
|
||||
clickPref(
|
||||
title = DSLSettingsText.from(R.string.preferences__internal_payment_copy_data),
|
||||
summary = DSLSettingsText.from(R.string.preferences__internal_payment_copy_data_description),
|
||||
onClick = {
|
||||
copyPaymentsDataToClipboard()
|
||||
}
|
||||
)
|
||||
|
||||
dividerPref()
|
||||
|
||||
sectionHeaderPref(R.string.preferences__internal_account)
|
||||
|
||||
clickPref(
|
||||
@@ -77,6 +65,14 @@ class InternalSettingsFragment : DSLSettingsFragment(R.string.preferences__inter
|
||||
}
|
||||
)
|
||||
|
||||
clickPref(
|
||||
title = DSLSettingsText.from(R.string.preferences__internal_refresh_profile),
|
||||
summary = DSLSettingsText.from(R.string.preferences__internal_refresh_profile_description),
|
||||
onClick = {
|
||||
refreshProfile()
|
||||
}
|
||||
)
|
||||
|
||||
clickPref(
|
||||
title = DSLSettingsText.from(R.string.preferences__internal_rotate_profile_key),
|
||||
summary = DSLSettingsText.from(R.string.preferences__internal_rotate_profile_key_description),
|
||||
@@ -117,6 +113,18 @@ class InternalSettingsFragment : DSLSettingsFragment(R.string.preferences__inter
|
||||
|
||||
dividerPref()
|
||||
|
||||
sectionHeaderPref(R.string.preferences__internal_payments)
|
||||
|
||||
clickPref(
|
||||
title = DSLSettingsText.from(R.string.preferences__internal_payment_copy_data),
|
||||
summary = DSLSettingsText.from(R.string.preferences__internal_payment_copy_data_description),
|
||||
onClick = {
|
||||
copyPaymentsDataToClipboard()
|
||||
}
|
||||
)
|
||||
|
||||
dividerPref()
|
||||
|
||||
sectionHeaderPref(R.string.preferences__internal_storage_service)
|
||||
|
||||
switchPref(
|
||||
@@ -444,6 +452,11 @@ class InternalSettingsFragment : DSLSettingsFragment(R.string.preferences__inter
|
||||
Toast.makeText(context, "Scheduled attribute refresh", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
||||
private fun refreshProfile() {
|
||||
ApplicationDependencies.getJobManager().add(RefreshOwnProfileJob())
|
||||
Toast.makeText(context, "Scheduled profile refresh", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
||||
private fun rotateProfileKey() {
|
||||
ApplicationDependencies.getJobManager().add(RotateProfileKeyJob())
|
||||
Toast.makeText(context, "Scheduled profile key rotation", Toast.LENGTH_SHORT).show()
|
||||
|
||||
Reference in New Issue
Block a user