Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Settings: Update sub-screens #5334

Merged
merged 18 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update sync and backup screen
I purposefully did not flag the minor margin changes for the divider, I didn't think it was worth it.
  • Loading branch information
mikescamell committed Dec 12, 2024
commit 747add15246eec4b84df4b29597b8245ed7853c8
1 change: 1 addition & 0 deletions sync/sync-impl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ dependencies {
implementation project(':navigation-api')
implementation project(':remote-messaging-api')
implementation project(path: ':autofill-api')
implementation project(path: ':settings-api') // temporary until we release new settings

implementation project(path: ':app-build-config-api')
implementation project(path: ':privacy-config-api')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import com.duckduckgo.di.*
import com.duckduckgo.di.scopes.*
import com.duckduckgo.navigation.api.GlobalActivityStarter
import com.duckduckgo.navigation.api.getActivityParams
import com.duckduckgo.settings.api.NewSettingsFeature
import com.duckduckgo.sync.api.*
import com.duckduckgo.sync.impl.ConnectedDevice
import com.duckduckgo.sync.impl.PermissionRequest
Expand Down Expand Up @@ -120,6 +121,9 @@ class SyncActivity : DuckDuckGoActivity() {
@Inject
lateinit var syncFeatureMessagesPlugin: DaggerSet<SyncMessagePlugin>

@Inject
lateinit var newSettingsFeature: NewSettingsFeature

private val syncIntroLauncher = registerForActivityResult(
SyncIntroContract(),
) { resultOk ->
Expand Down Expand Up @@ -148,6 +152,11 @@ class SyncActivity : DuckDuckGoActivity() {
super.onCreate(savedInstanceState)
setContentView(binding.root)
setupToolbar(binding.includeToolbar.toolbar)

if (newSettingsFeature.self().isEnabled()) {
binding.viewSyncDisabled.otherOptionsHeader.setText(R.string.sync_setup_other_options_title)
}

observeUiEvents()
registerForPermission()
configureSettings()
Expand Down
3 changes: 3 additions & 0 deletions sync/sync-impl/src/main/res/layout/view_sync_disabled.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@

<com.duckduckgo.common.ui.view.divider.HorizontalDivider
android:layout_width="match_parent"
android:layout_marginVertical="@dimen/keyline_2"
android:layout_height="wrap_content" />

<com.duckduckgo.common.ui.view.listitem.SectionHeaderListItem
android:id="@+id/otherOptionsHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:primaryText="@string/sync_setup_single_device_title"/>
Expand All @@ -71,6 +73,7 @@

<com.duckduckgo.common.ui.view.divider.HorizontalDivider
android:layout_width="match_parent"
android:layout_marginVertical="@dimen/keyline_2"
android:layout_height="wrap_content" />

<com.duckduckgo.common.ui.view.listitem.OneLineListItem
Expand Down
3 changes: 2 additions & 1 deletion sync/sync-impl/src/main/res/values/strings-sync.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<!-- smartling.entity_escaping = false -->
<!-- smartling.instruction_attributes = instruction -->
<resources>
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Sync Disabled messages -->
<string name="sync_flows_disabled"><b>Sync &amp; Backup Unavailable</b>\nSorry, but Sync &amp; Backup is currently unavailable. Please try again later.</string>
<string name="sync_flows_disabled_new_version"><b>Sync &amp; Backup Unavailable</b>\nSorry, but Sync &amp; Backup is no longer available in this app version. Please update DuckDuckGo to the latest version to continue.</string>
Expand All @@ -36,6 +36,7 @@
<string name="sync_setup_with_another_device_cta_subtitle">Securely sync bookmarks and passwords between your devices.</string>
<string name="sync_off_hint">Your data is end-to-end encrypted, and DuckDuckGo does not have access to the encryption key.</string>
<string name="sync_setup_single_device_title">Single-Device Setup</string>
<string name="sync_setup_other_options_title" tools:ignore="MissingTranslation">Other Options</string>
<string name="sync_setup_single_recover_data_cta_title">Recover Synced Data</string>
<string name="sync_setup_single_sync_this_device_cta_title">Sync and Back Up This Device</string>

Expand Down