mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 00:29:11 +01:00
Add remote_backups cta action for release notes.
This commit is contained in:
@@ -798,6 +798,13 @@ class InternalSettingsFragment : DSLSettingsFragment(R.string.preferences__inter
|
||||
}
|
||||
)
|
||||
|
||||
clickPref(
|
||||
title = DSLSettingsText.from("Add remote backups note"),
|
||||
onClick = {
|
||||
viewModel.addSampleReleaseNote("remote_backups")
|
||||
}
|
||||
)
|
||||
|
||||
clickPref(
|
||||
title = DSLSettingsText.from("Add remote donate megaphone"),
|
||||
onClick = {
|
||||
|
||||
@@ -42,7 +42,7 @@ class InternalSettingsRepository(context: Context) {
|
||||
}
|
||||
}
|
||||
|
||||
fun addSampleReleaseNote() {
|
||||
fun addSampleReleaseNote(callToAction: String) {
|
||||
SignalExecutors.UNBOUNDED.execute {
|
||||
AppDependencies.jobManager.runSynchronously(CreateReleaseChannelJob.create(), 5000)
|
||||
|
||||
@@ -52,7 +52,7 @@ class InternalSettingsRepository(context: Context) {
|
||||
val bodyRangeList = BodyRangeList.Builder()
|
||||
.addStyle(BodyRangeList.BodyRange.Style.BOLD, 0, title.length)
|
||||
|
||||
bodyRangeList.addButton("Call to Action Text", "action", body.lastIndex, 0)
|
||||
bodyRangeList.addButton("Call to Action Text", callToAction, body.lastIndex, 0)
|
||||
|
||||
val recipientId = SignalStore.releaseChannel.releaseChannelRecipientId!!
|
||||
val threadId = SignalDatabase.threads.getOrCreateThreadIdFor(Recipient.resolved(recipientId))
|
||||
|
||||
@@ -154,8 +154,8 @@ class InternalSettingsViewModel(private val repository: InternalSettingsReposito
|
||||
refresh()
|
||||
}
|
||||
|
||||
fun addSampleReleaseNote() {
|
||||
repository.addSampleReleaseNote()
|
||||
fun addSampleReleaseNote(callToAction: String = "action") {
|
||||
repository.addSampleReleaseNote(callToAction)
|
||||
}
|
||||
|
||||
fun addRemoteDonateMegaphone() {
|
||||
|
||||
Reference in New Issue
Block a user