tinySSB icon indicating copy to clipboard operation
tinySSB copied to clipboard

Moving the storage of user settings from the frontend to the backend

Open jannickheisch opened this issue 1 year ago • 0 comments

What?

This PR shifts the storage of user preferences from the frontend to the backend.

Why?

Previously, the settings were saved in both the frontend and the backend. In the event of a crash, this could lead to inconsistencies between the user settings displayed in the frontend and the settings implemented in the backend. Therefore, the storage and management of user settings has been moved completely from the frontend to the backend.

How?

The backend stores all settings in a key-value store, with the key serving as the identifier for each setting and the corresponding value representing its current status. The frontend can modify these settings through backend calls. During initialization, the frontend retrieves the current status of the settings from the backend and can also query the current state of all saved settings at runtime.

Testing

Tested with two android smartphones (SDK 29 & 30).

jannickheisch avatar Jan 30 '24 12:01 jannickheisch