fix: half screen black on login

This commit is contained in:
Fredrik Burmester
2025-02-19 10:54:05 +01:00
parent cfbac538f8
commit 14b717f985
2 changed files with 5 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ import {
TouchableOpacity,
View,
} from "react-native";
import { Keyboard } from "react-native";
import { z } from "zod";
import { t } from "i18next";
@@ -38,7 +39,7 @@ const Login: React.FC = () => {
username: _username,
password: _password,
} = params as { apiUrl: string; username: string; password: string };
const [loadingServerCheck, setLoadingServerCheck] = useState<boolean>(false);
const [loading, setLoading] = useState<boolean>(false);
const [serverURL, setServerURL] = useState<string>(_apiUrl);
@@ -92,6 +93,8 @@ const Login: React.FC = () => {
}, [serverName, navigation, api?.basePath]);
const handleLogin = async () => {
Keyboard.dismiss();
setLoading(true);
try {
const result = CredentialsSchema.safeParse(credentials);
@@ -112,7 +115,6 @@ const Login: React.FC = () => {
}
};
/**
* Checks the availability and validity of a Jellyfin server URL.
*

View File

@@ -303,6 +303,7 @@ export const JellyfinProvider: React.FC<{ children: ReactNode }> = ({
mutationFn: async () => {
storage.delete("token");
setUser(null);
setApi(null);
setPluginSettings(undefined);
await clearAllJellyseerData();
},