web_lib

Common web application libraries
git clone https://radroots.dev/git/web_lib.git
Log | Files | Refs | LICENSE

commit 2f2190cec4b428e3f73c617834f5b2d7e210768c
parent 42723560b2cf61e3917be65ac6c1b8b40e164d85
Author: triesap <137732411+triesap@users.noreply.github.com>
Date:   Mon, 26 Aug 2024 07:15:34 +0000

client: add preferences api remove method

Diffstat:
Mclient/src/capacitor/preferences.ts | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/client/src/capacitor/preferences.ts b/client/src/capacitor/preferences.ts @@ -17,4 +17,13 @@ export class CapacitorClientPreferences implements IClientPreferences { if (typeof res.value === 'string') return res.value; } catch (e) { }; } + + public async remove(key: string): Promise<boolean> { + try { + await Preferences.remove({ key }); + return true; + } catch (e) { + return false; + }; + } }