Fix authStore not overwriting
This commit is contained in:
@@ -7,8 +7,8 @@ android {
|
||||
applicationId "us.materialio.app"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 219
|
||||
versionName "1.16.1"
|
||||
versionCode 220
|
||||
versionName "1.16.2"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
aaptOptions {
|
||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||
|
||||
@@ -84,7 +84,11 @@
|
||||
|
||||
|
||||
|
||||
<release version="1.16.1" date="2026-2-18">
|
||||
|
||||
<release version="1.16.2" date="2026-2-18">
|
||||
<url>https://github.com/Materialious/Materialious/releases/tag/1.16.2</url>
|
||||
</release>
|
||||
<release version="1.16.1" date="2026-2-18">
|
||||
<url>https://github.com/Materialious/Materialious/releases/tag/1.16.1</url>
|
||||
</release>
|
||||
<release version="1.16.0" date="2026-2-18">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Materialious",
|
||||
"version": "1.16.1",
|
||||
"version": "1.16.2",
|
||||
"description": "Modern material design for YouTube and Invidious.",
|
||||
"author": {
|
||||
"name": "Ward Pearce",
|
||||
@@ -45,4 +45,4 @@
|
||||
"capacitor",
|
||||
"electron"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "materialious",
|
||||
"version": "1.16.1",
|
||||
"version": "1.16.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "npm run patch:github && vite dev",
|
||||
|
||||
@@ -9,13 +9,15 @@ import { addOrUpdateKeyValue, getKeyValue } from '$lib/api/backend';
|
||||
import { rawMasterKeyStore } from '$lib/store';
|
||||
import { getPublicEnv } from '$lib/misc';
|
||||
|
||||
const allowNullOverwrite = ['authToken'];
|
||||
|
||||
export async function syncSettingsToBackend() {
|
||||
if (!isOwnBackend() || !get(rawMasterKeyStore)) return;
|
||||
|
||||
await Promise.all(
|
||||
persistedStores.map(async (store) => {
|
||||
getKeyValue(store.name).then((currentKeyValue) => {
|
||||
if (currentKeyValue !== null) {
|
||||
if (currentKeyValue !== null || allowNullOverwrite.includes(store.name)) {
|
||||
const currentKeyValueParsed = parseWithSchema(store.schema, currentKeyValue);
|
||||
if (currentKeyValueParsed !== null && currentKeyValueParsed !== undefined) {
|
||||
store.store.set(currentKeyValueParsed);
|
||||
|
||||
@@ -148,7 +148,9 @@
|
||||
|
||||
onMount(async () => {
|
||||
if ($invidiousAuthStore && !isYTBackend()) {
|
||||
loadNotifications().catch(() => invidiousLogout());
|
||||
loadNotifications().catch(() => {
|
||||
invidiousLogout();
|
||||
});
|
||||
}
|
||||
|
||||
if ($rawMasterKeyStore) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -3,7 +3,7 @@ import os
|
||||
import re
|
||||
from datetime import datetime
|
||||
|
||||
LATEST_VERSION = "1.16.1"
|
||||
LATEST_VERSION = "1.16.2"
|
||||
RELEASE_DATE = datetime.now().strftime("%Y-%-m-%d") # Format: YYYY-M-D
|
||||
|
||||
WORKING_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "materialious")
|
||||
|
||||
Reference in New Issue
Block a user