Skip to content

Commit 0589c12

Browse files
authored
Rebranding: Remove from This Device copy update (#6498)
Task/Issue URL: https://app.asana.com/1/137249556945/project/38424471409662/task/1210937297740148?focus=true ### Description Add rebranding string for "Remove from This Device" alert ### Steps to test this PR - [x] Apply patch on https://app.asana.com/1/137249556945/project/1209991789468715/task/1210448620621729?focus=true - [x] Install from branch - [x] Purchase a subscription - [x] Go to Subscription Settings - [x] Tap on "Remove from This Device" - [x] Check copy is updated to "You will no longer be able to access your subscription on this device. This will not cancel your subscription, and it will remain active on your other devices." ### UI changes | Before | After | | ------ | ----- | <img width="381" height="820" alt="Screenshot 2025-07-31 at 12 42 28" src="https://github.com/user-attachments/assets/2e63fb7e-3912-45e5-bbf3-d6561d88ce51" />|<img width="374" height="823" alt="Screenshot 2025-07-31 at 12 42 34" src="https://github.com/user-attachments/assets/1d7850c2-f006-452f-9088-0072b3a2ffb1" />|
1 parent c704c01 commit 0589c12

File tree

2 files changed

+25
-20
lines changed

2 files changed

+25
-20
lines changed

subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/ui/SubscriptionSettingsActivity.kt

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -99,26 +99,6 @@ class SubscriptionSettingsActivity : DuckDuckGoActivity() {
9999
.onEach { renderView(it) }
100100
.launchIn(lifecycleScope)
101101

102-
binding.removeDevice.setClickListener {
103-
TextAlertDialogBuilder(this)
104-
.setTitle(string.removeFromDevice)
105-
.setMessage(string.removeFromDeviceDescription)
106-
.setPositiveButton(string.removeSubscription, DESTRUCTIVE)
107-
.setNegativeButton(string.cancel, GHOST_ALT)
108-
.addEventListener(
109-
object : TextAlertDialogBuilder.EventListener() {
110-
override fun onPositiveButtonClicked() {
111-
viewModel.removeFromDevice()
112-
}
113-
114-
override fun onNegativeButtonClicked() {
115-
// NOOP
116-
}
117-
},
118-
)
119-
.show()
120-
}
121-
122102
binding.manageEmail.setOnClickListener {
123103
viewModel.onEditEmailButtonClicked()
124104
}
@@ -167,17 +147,21 @@ class SubscriptionSettingsActivity : DuckDuckGoActivity() {
167147

168148
private fun renderView(viewState: ViewState.Ready) {
169149
// Privacy Pro Rebranding active
150+
val removeFromDeviceMessage: Int
170151
if (viewState.rebrandingEnabled) {
152+
removeFromDeviceMessage = string.removeFromDeviceDescriptionRebranding
171153
binding.subscriptionSettingsProductName.setText(string.privacyProRebranding)
172154
binding.activateOnOtherDevices.setText(string.activateOnOtherDevicesRebranding)
173155
binding.faq.setPrimaryText(getString(string.privacyProFaqRebranding))
174156
binding.faq.setSecondaryText(getString(string.privacyProFaqSecondaryRebranding))
175157
} else {
158+
removeFromDeviceMessage = string.removeFromDeviceDescription
176159
binding.subscriptionSettingsProductName.setText(string.privacyPro)
177160
binding.activateOnOtherDevices.setText(string.activateOnOtherDevices)
178161
binding.faq.setPrimaryText(getString(string.privacyProFaq))
179162
binding.faq.setSecondaryText(getString(string.privacyProFaqSecondary))
180163
}
164+
181165
if (viewState.showRebrandingBanner) {
182166
binding.includePrivacyProRebrandingBanner.root.show()
183167
binding.includePrivacyProRebrandingBanner.settingsBannerClose.setOnClickListener {
@@ -279,6 +263,26 @@ class SubscriptionSettingsActivity : DuckDuckGoActivity() {
279263
} else {
280264
binding.sendFeedback.gone()
281265
}
266+
267+
binding.removeDevice.setClickListener {
268+
TextAlertDialogBuilder(this)
269+
.setTitle(string.removeFromDevice)
270+
.setMessage(removeFromDeviceMessage)
271+
.setPositiveButton(string.removeSubscription, DESTRUCTIVE)
272+
.setNegativeButton(string.cancel, GHOST_ALT)
273+
.addEventListener(
274+
object : TextAlertDialogBuilder.EventListener() {
275+
override fun onPositiveButtonClicked() {
276+
viewModel.removeFromDevice()
277+
}
278+
279+
override fun onNegativeButtonClicked() {
280+
// NOOP
281+
}
282+
},
283+
)
284+
.show()
285+
}
282286
}
283287

284288
private fun processCommand(command: Command) {

subscriptions/subscriptions-impl/src/main/res/values/donottranslate.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,5 @@
4242
<string name="addToDeviceSecondaryTextWithEmailRebranding">Use the email above to add your subscription on your other devices in the DuckDuckGo app. Go to Settings > Subscription Settings > I Have a Subscription.</string>
4343
<string name="subscriptionSettingRebrandingMessage">Privacy Pro is now just called the DuckDuckGo subscription</string>"
4444
<string name="subscriptionSettingSubscribeRebranding">Protect your connection and identity with one subscription.</string>
45+
<string name="removeFromDeviceDescriptionRebranding">You will no longer be able to access your subscription on this device. This will not cancel your subscription, and it will remain active on your other devices.</string>
4546
</resources>

0 commit comments

Comments
 (0)