mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-01 03:28:27 +01:00
Compare commits
4 Commits
chore/migr
...
fix/qr-cod
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3ccedc85c | ||
|
|
52e6f56220 | ||
|
|
6f21545f19 | ||
|
|
695027911a |
3
app.json
3
app.json
@@ -29,7 +29,8 @@
|
||||
},
|
||||
"supportsTablet": true,
|
||||
"entitlements": {
|
||||
"com.apple.developer.networking.wifi-info": true
|
||||
"com.apple.developer.networking.wifi-info": true,
|
||||
"com.apple.developer.networking.multicast": true
|
||||
},
|
||||
"bundleIdentifier": "com.fredrikburmester.streamyfin",
|
||||
"icon": "./assets/images/icon-ios-liquid-glass.icon",
|
||||
|
||||
@@ -69,6 +69,13 @@ const initialApi = (() => {
|
||||
|
||||
const initialUser = (() => {
|
||||
try {
|
||||
// Only return a stored user if we also have a token. Otherwise the
|
||||
// user atom would be populated while the api atom is null (e.g. after
|
||||
// a logout that left stale user JSON in storage), which causes
|
||||
// useProtectedRoute to keep us inside the (auth) group instead of
|
||||
// redirecting to /login.
|
||||
const token = storage.getString("token");
|
||||
if (!token) return null;
|
||||
const userStr = storage.getString("user");
|
||||
if (userStr) {
|
||||
return JSON.parse(userStr) as UserDto;
|
||||
@@ -402,6 +409,7 @@ export const JellyfinProvider: React.FC<{ children: ReactNode }> = ({
|
||||
);
|
||||
|
||||
storage.remove("token");
|
||||
storage.remove("user");
|
||||
clearTVDiscoverySafely();
|
||||
setUser(null);
|
||||
setApi(null);
|
||||
|
||||
Reference in New Issue
Block a user