Skip to content

Commit

Permalink
Onboard screens shortlist to RMF deeplink (#4467)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/488551667048375/1207164955333567/f

### Description
Onboard the screen shortlisted in Asana task to rmf deeplink

### Steps to test this PR

_Feature 1_
- [ ]
- [ ]
  • Loading branch information
aitorvs authored Apr 25, 2024
1 parent 5ce10c2 commit 4e088ac
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ package com.duckduckgo.anvil.annotations
import kotlin.reflect.KClass

/**
* Anvil annotation to generate and contribute the Map<ActivityParams, Class<ActivityParams>> to the activity starter
* Anvil annotation to generate and contribute the Map<ActivityParams, Class<ActivityParams>> to the activity starter.
* It is also possible to define a [screenName], that can be used to deeplink to a screen from RMF.
*
* The [screenName] should be named as [feature].<screenName>. For instance, for the VPN feature has many sub-screens, eg. main, settings and so
* they could be named "vpn.main", "vpn.settings" etc.
* Not all screens will have a parent feature, for instance the main settings screen would be named just "settings"
*
* Usage:
* ```kotlin
* @ContributeToActivityStarter(ExampleActivityParams::class)
* @ContributeToActivityStarter(ExampleActivityParams::class, screenName = "example")
* class MyActivity {
*
* }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ import nl.dionsegijn.konfetti.models.Shape
import nl.dionsegijn.konfetti.models.Size

@InjectWith(ActivityScope::class)
@ContributeToActivityStarter(AppTrackerActivityWithEmptyParams::class)
@ContributeToActivityStarter(AppTrackerActivityWithEmptyParams::class, screenName = "apptp.main")
class DeviceShieldTrackerActivity :
DuckDuckGoActivity(),
DeviceShieldActivityFeedFragment.DeviceShieldActivityFeedListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ import java.util.*
import javax.inject.Inject

@InjectWith(ActivityScope::class)
@ContributeToActivityStarter(BookmarksScreenNoParams::class)
@ContributeToActivityStarter(BookmarksScreenNoParams::class, screenName = "bookmarks")
class BookmarksActivity : DuckDuckGoActivity() {

@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ import kotlinx.coroutines.flow.onEach
import timber.log.Timber

@InjectWith(ActivityScope::class)
@ContributeToActivityStarter(SettingsScreenNoParams::class)
@ContributeToActivityStarter(SettingsScreenNoParams::class, screenName = "settings")
class SettingsActivity : DuckDuckGoActivity() {

private val viewModel: SettingsViewModel by bindViewModel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch

@InjectWith(ActivityScope::class)
@ContributeToActivityStarter(NetworkProtectionManagementScreenNoParams::class)
@ContributeToActivityStarter(NetworkProtectionManagementScreenAndEnable::class)
@ContributeToActivityStarter(NetworkProtectionManagementScreenNoParams::class, screenName = "vpn.main")
@ContributeToActivityStarter(NetworkProtectionManagementScreenAndEnable::class, screenName = "vpn.main")
class NetworkProtectionManagementActivity : DuckDuckGoActivity() {

@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import kotlinx.coroutines.flow.onEach
scope = ActivityScope::class,
delayGeneration = true, // VpnSettingPlugin can be contributed from other modules
)
@ContributeToActivityStarter(NetPVpnSettingsScreenNoParams::class)
@ContributeToActivityStarter(NetPVpnSettingsScreenNoParams::class, screenName = "vpn.settings")
class NetPVpnSettingsActivity : DuckDuckGoActivity() {

@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach

@InjectWith(ActivityScope::class)
@ContributeToActivityStarter(SubscriptionsSettingsScreenWithEmptyParams::class)
@ContributeToActivityStarter(SubscriptionsSettingsScreenWithEmptyParams::class, screenName = "ppro.settings")
class SubscriptionSettingsActivity : DuckDuckGoActivity() {

@Inject
Expand Down

0 comments on commit 4e088ac

Please sign in to comment.