Add new backups iconography and copy.

This commit is contained in:
Alex Hart
2024-10-08 15:51:48 -03:00
committed by Greyson Parrelli
parent ce6f0ca483
commit 3381d20bd7
22 changed files with 574 additions and 171 deletions

View File

@@ -0,0 +1,36 @@
/*
* Copyright 2024 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.thoughtcrime.securesms.billing
import android.content.Intent
import android.net.Uri
import androidx.fragment.app.Fragment
import androidx.lifecycle.lifecycleScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.dependencies.GooglePlayBillingDependencies
/**
* Launches user to the Google Play backups management screen.
*/
fun Fragment.launchManageBackupsSubscription() {
lifecycleScope.launch(Dispatchers.Main) {
val uri = withContext(Dispatchers.Default) {
Uri.parse(
getString(
R.string.backup_subscription_management_url,
GooglePlayBillingDependencies.getProductId(),
requireContext().applicationInfo.packageName
)
)
}
val intent = Intent(Intent.ACTION_VIEW, uri)
startActivity(intent)
}
}