Skip to content

Commit

Permalink
default to not checking permissions except where we explicitly want to
Browse files Browse the repository at this point in the history
  • Loading branch information
walmat committed Jan 3, 2025
1 parent 37c5731 commit e8ce4db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/handlers/cloudBackup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ export type GoogleDriveUserData = {
avatarUrl?: string;
};

export async function getGoogleAccountUserData(): Promise<GoogleDriveUserData | undefined> {
export async function getGoogleAccountUserData(checkPermissions = false): Promise<GoogleDriveUserData | undefined> {
if (!IS_ANDROID) {
return;
}
return RNCloudFs.getCurrentlySignedInUserData({ checkPermissions: true });
return RNCloudFs.getCurrentlySignedInUserData({ checkPermissions });
}

// This is used for dev purposes only!
Expand Down
2 changes: 1 addition & 1 deletion src/state/backups/backups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const backupsStore = createRainbowStore<BackupsStore>((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 });
Expand Down

0 comments on commit e8ce4db

Please sign in to comment.