File tree Expand file tree Collapse file tree
sync/sync-internal/src/main
java/com/duckduckgo/sync/internal/ui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,9 +167,6 @@ class SyncInternalSettingsActivity : DuckDuckGoActivity() {
167167 binding.fetchAccessCredentialsButton.setOnClickListener { viewModel.onFetchAccessCredentialsClicked() }
168168 binding.requestScopedTokenButton.setOnClickListener { viewModel.onRequestScopedTokenClicked() }
169169 binding.fetchKeysButton.setOnClickListener { viewModel.onFetchKeysClicked() }
170- binding.createProtectedKeyButton.setOnClickListener {
171- viewModel.onCreateProtectedKeyClicked(binding.createProtectedKeyPurposeInput.text)
172- }
173170 binding.createThirdPartyCredentialButton.setOnClickListener { viewModel.onCreateThirdPartyCredentialClicked() }
174171 binding.refreshThirdPartyCredentialButton.setOnClickListener { viewModel.onRefreshThirdPartyCredentialClicked() }
175172 binding.showThirdPartyRecoveryQrButton.setOnClickListener { viewModel.onShowThirdPartyRecoveryQrClicked() }
Original file line number Diff line number Diff line change @@ -604,28 +604,6 @@ constructor(
604604 }
605605 }
606606
607- fun onCreateProtectedKeyClicked (purpose : String ) {
608- viewModelScope.launch(dispatchers.io()) {
609- logcat { " Sync-ScopedToken: creating protected key for purpose=$purpose from dev screen" }
610- if (syncStore.token.isNullOrEmpty()) {
611- logcat(LogPriority .WARN ) { " Sync-ScopedToken: not signed in, skipping create protected key" }
612- command.send(ShowMessage (" Not signed in" ))
613- return @launch
614- }
615- if (purpose.isBlank()) {
616- command.send(ShowMessage (" Purpose is required" ))
617- return @launch
618- }
619- when (val result = syncAccountRepository.createProtectedKey(purpose)) {
620- is Success -> {
621- command.send(ShowMessage (" Protected key created for $purpose " ))
622- refreshKeys()
623- }
624- is Error -> command.send(ShowMessage (" Create key failed: ${result.reason} " ))
625- }
626- }
627- }
628-
629607 private fun checkSyncAutoRestoreFlag () {
630608 val enabled = syncFeature.syncAutoRestore().isEnabled()
631609 viewState.update { state ->
Original file line number Diff line number Diff line change 158158 android : layout_marginBottom =" @dimen/keyline_4"
159159 app : typography =" body2" />
160160
161- <com .duckduckgo.common.ui.view.text.DaxTextInput
162- android : id =" @+id/createProtectedKeyPurposeInput"
163- android : layout_width =" match_parent"
164- android : layout_height =" wrap_content"
165- android : layout_marginStart =" @dimen/keyline_4"
166- android : layout_marginEnd =" @dimen/keyline_4"
167- android : hint =" Purpose (e.g. ai_chats, sync)"
168- android : text =" ai_chats"
169- app : editable =" true"
170- app : type =" single_line" />
171-
172- <com .duckduckgo.common.ui.view.button.DaxButtonPrimary
173- android : id =" @+id/createProtectedKeyButton"
174- android : layout_width =" wrap_content"
175- android : layout_height =" wrap_content"
176- android : layout_margin =" 10dp"
177- android : text =" Create Protected Key" />
178-
179161 <com .duckduckgo.common.ui.view.listitem.SectionHeaderListItem
180162 android : layout_width =" match_parent"
181163 android : layout_height =" wrap_content"
You can’t perform that action at this time.
0 commit comments