Repository navigation
feat: [PREFERENCES] Delete a preference entry from the desktop - #731
Merged
Merged
Conversation
New remove_shared_preference_value method: FloconPreference.remove (no-op by default), implemented for SharedPreferences, DataStore and UserDefaults. The desktop adds a Delete item to the row right-click menu, with a confirmation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Delete a preference key from the desktop Preferences screen: right-click a row → Delete → confirm, and the connected app removes the key, then sends back the refreshed values.
Built on the typed table from #730 (already merged, so this targets
maindirectly).remove_shared_preference_value(requestId,sharedPreferenceName,key) in bothProtocol.kt, documented inprotocol/shared-preferences.md. Older SDKs ignore it.FloconPreference.remove(columnName), which does nothing by default so custom implementations still compile. It's implemented for Android SharedPreferences, DataStore and iOS UserDefaults, plus the no-op parity and the multiplatformSamplePreferences. JVM and wasm have no built-in preferences to implement.FloconSharedPrefsPluginhandles the message and answers like a set does. AddedjvmTestcases.RemoveSharedPrefFieldUseCase→ repository → remote datasource. The row uses the existingContextualMenu, the confirmation usesFloconDialog, andSharedPreferencesViewModel.onDeleteClickedis new. Strings are in EN and FR.docs/sharedpref.md(feature + optionalremoveoverride in the custom example).Checks:
:sharedprefs:jvmTest,:sharedprefs-no-op/:datastores*/:sample-multiplatformcompile,:sample:android:assembleDebug assembleRelease,:composeApp:allTests :mcp:allTests ktlintCheck,mkdocs build --strict./gemini review