Optimized GhostRecorder and Supabase Manager

This commit is contained in:
Thorbjoern
2025-07-11 01:59:51 +02:00
parent ea4fec53a6
commit 8e711ca067
2 changed files with 4 additions and 2 deletions
@@ -129,6 +129,8 @@ namespace GhostSystem
{ {
Debug.LogWarning($"Batch insert failed: {response.ResponseMessage.StatusCode}, fallback to offline."); Debug.LogWarning($"Batch insert failed: {response.ResponseMessage.StatusCode}, fallback to offline.");
await FallbackToOfflineAsync(batch); await FallbackToOfflineAsync(batch);
OnUploadFinished?.Invoke(); // Die Action für das Ende des Ladescreens wird trotzdem ausgelöst.
Debug.Log("Upload Finished");
} }
if (response.ResponseMessage.IsSuccessStatusCode && sceneIdReady) // Löst Action aus, wenn der Upload geklappt hat und die neue Szene geladen ist. if (response.ResponseMessage.IsSuccessStatusCode && sceneIdReady) // Löst Action aus, wenn der Upload geklappt hat und die neue Szene geladen ist.
{ {
@@ -70,10 +70,10 @@ namespace GhostSystem
else else
{ {
email = string.IsNullOrEmpty(SystemInfo.deviceUniqueIdentifier) email = string.IsNullOrEmpty(SystemInfo.deviceUniqueIdentifier)
? $"{Guid.NewGuid()}@device.local" ? $"{Guid.NewGuid()}@device.local" // Fallback, generiert theoretisch bei jeder Neuinstallation der App einen anderen User.
: $"{SystemInfo.deviceUniqueIdentifier}@device.local"; : $"{SystemInfo.deviceUniqueIdentifier}@device.local";
password = Convert.ToBase64String(Guid.NewGuid().ToByteArray()); password = email; // selbe GUID, damit das Passwort sich nicht pro App-Version verändern kann.
await UniTask.Run(() => File.WriteAllLines(path, new[] { email, password })); await UniTask.Run(() => File.WriteAllLines(path, new[] { email, password }));
} }