From e8ce4dbb952cbf30f21b1cda720e89109f3a9007 Mon Sep 17 00:00:00 2001 From: Matthew Wall Date: Fri, 3 Jan 2025 16:27:08 -0500 Subject: [PATCH] default to not checking permissions except where we explicitly want to --- src/handlers/cloudBackup.ts | 4 ++-- src/state/backups/backups.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/handlers/cloudBackup.ts b/src/handlers/cloudBackup.ts index 8c38526269b..7e461e8e482 100644 --- a/src/handlers/cloudBackup.ts +++ b/src/handlers/cloudBackup.ts @@ -39,11 +39,11 @@ export type GoogleDriveUserData = { avatarUrl?: string; }; -export async function getGoogleAccountUserData(): Promise { +export async function getGoogleAccountUserData(checkPermissions = false): Promise { if (!IS_ANDROID) { return; } - return RNCloudFs.getCurrentlySignedInUserData({ checkPermissions: true }); + return RNCloudFs.getCurrentlySignedInUserData({ checkPermissions }); } // This is used for dev purposes only! diff --git a/src/state/backups/backups.ts b/src/state/backups/backups.ts index ef1abf3ab23..4c6004756db 100644 --- a/src/state/backups/backups.ts +++ b/src/state/backups/backups.ts @@ -98,7 +98,7 @@ export const backupsStore = createRainbowStore((set, get) => ({ } if (IS_ANDROID) { - const gdata = await getGoogleAccountUserData(); + const gdata = await getGoogleAccountUserData(true); if (!gdata) { logger.debug('[backupsStore]: Google account is not available'); set({ backupProvider: undefined, status: CloudBackupState.NotAvailable, backups: { files: [] }, mostRecentBackup: undefined });