Add remote_backups cta action for release notes.

This commit is contained in:
Cody Henthorne
2026-02-20 11:47:14 -05:00
parent 6e108a03d1
commit 541b4674a8
4 changed files with 18 additions and 12 deletions

View File

@@ -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 = {

View File

@@ -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))

View File

@@ -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() {