mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-10 16:21:36 +00:00
Attempt to fix Android cookies
This commit is contained in:
parent
fa8f31981e
commit
059c52b370
@ -129,7 +129,10 @@ const SettingsForm = ({
|
||||
onChange={(e) => {
|
||||
const fontSize = e.target.value;
|
||||
setSettings({ ...settings, fontSize });
|
||||
systemClient.setCookie(`settings_fontsize_${settings.frontend}`, fontSize);
|
||||
systemClient.setCookie(
|
||||
`settings_fontsize_${settings.frontend}`,
|
||||
fontSize.toString(),
|
||||
);
|
||||
}}
|
||||
valueLabelDisplay='off'
|
||||
marks={fontSizes.map(({ label, value }) => ({
|
||||
|
@ -22,8 +22,9 @@ class SystemNativeClient implements SystemClient {
|
||||
});
|
||||
};
|
||||
|
||||
public getCookie: (key: string) => string | undefined = (key) => {
|
||||
return window.NativeRobosats?.cookies[key];
|
||||
public getCookie: (key: string) => string = (key) => {
|
||||
const cookie = window.NativeRobosats?.cookies[key];
|
||||
return cookie === null || cookie === undefined ? '' : cookie;
|
||||
};
|
||||
|
||||
public setCookie: (key: string, value: string) => void = (key, value) => {
|
||||
|
@ -27,7 +27,7 @@ class SystemWebClient implements SystemClient {
|
||||
}
|
||||
};
|
||||
|
||||
public getCookie: (key: string) => string | undefined = (key) => {
|
||||
public getCookie: (key: string) => string = (key) => {
|
||||
let cookieValue = null;
|
||||
if (document.cookie && document.cookie !== '') {
|
||||
const cookies = document.cookie.split(';');
|
||||
|
Loading…
Reference in New Issue
Block a user