Skip to content

Commit

Permalink
Refactor interface names for MiniApp Preference
Browse files Browse the repository at this point in the history
  • Loading branch information
rleojoseph committed Jan 26, 2024
1 parent 46ed1ab commit b173424
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions js-miniapp-bridge/src/modules/miniapp-preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class MiniAppPreferences {
set(key: string, value: string) {
return new Promise<boolean>((resolve, reject) => {
return this.executor.exec(
'setPreference',
'setMiniAppPreference',
{ preferenceKey: key, preferenceValue: value },
response => {
resolve(MiniAppBridgeUtils.BooleanValue(response));
Expand All @@ -37,7 +37,7 @@ export class MiniAppPreferences {
get(key: string) {
return new Promise<string>((resolve, reject) => {
return this.executor.exec(
'getPreference',
'getMiniAppPreference',
{ preferenceKey: key },
response => {
resolve(response);
Expand All @@ -55,7 +55,7 @@ export class MiniAppPreferences {
remove(key: string) {
return new Promise<boolean>((resolve, reject) => {
return this.executor.exec(
'getPreference',
'removeMiniAppPreference',
{ preferenceKey: key },
response => {
resolve(MiniAppBridgeUtils.BooleanValue(response));
Expand Down
2 changes: 1 addition & 1 deletion js-miniapp-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ import MiniApp from 'js-miniapp-sdk';
## MiniApp storage using Key/Value <small style="color:green;font-size: 12px">Available from v1.20.0</small>
[Secure storage](#secure-storage) uses database for storing any data from MiniApp. It is recommended for MiniApps that wants to store huge data.
We already have a [Secure storage](#secure-storage) that uses database for storing any data from MiniApp. It is recommended for MiniApps that wants to store huge data.
If MiniApp wants to use any storage that is lightweight, then they can use the following interfaces.
Android uses Shared Preferences and iOS uses UserDefaults for the interfaces below,
Expand Down

0 comments on commit b173424

Please sign in to comment.