Skip to content

Conversation

HDJKER
Copy link

@HDJKER HDJKER commented May 28, 2024

feat:多请求返回值类型修改

@HDJKER HDJKER changed the title feat:多权限请求返回值问题 feat:Modifying the return value of multi permission requests May 28, 2024
@HDJKER
Copy link
Author

HDJKER commented May 28, 2024

feat:func "checkMultiple" reutrn {Permission[1]:GrantStatus...}

@HDJKER
Copy link
Author

HDJKER commented May 28, 2024

feat:func "requestMultiple" reutrn {Permission[1]:GrantStatus...}

@HDJKER HDJKER marked this pull request as ready for review May 28, 2024 13:11
@HDJKER HDJKER force-pushed the sig branch 2 times, most recently from 3b9b235 to c29d179 Compare May 29, 2024 01:01
let Status = await atManager.checkAccessToken(tokenId, permissions[index]);
grantStatus.push(this.checkStatus(Status));
const Status = await atManager.checkAccessToken(tokenId, permissions[index]);
grantStatus[permissions[index]]=this.checkStatus(Status);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

少空格

let atManager: abilityAccessCtrl.AtManager = abilityAccessCtrl.createAtManager();
let resultsStatus: GrantStatus[] = [];
type PermissionStatusRecord = Record<string, GrantStatus>;
let resultsStatus:PermissionStatusRecord= { };

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

少空格,可合并
let resultsStatus: Record<string, GrantStatus> = {};

for (let index = 0; index < resultData.authResults.length; index++) {
resultsStatus.push(this.checkStatus(resultData.authResults[index]));
const status = this.checkStatus(resultData.authResults[index]);
resultsStatus[permissions[index]]=status;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

少空格

}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

无意义修改

/**
* 请求多个权限
*/
async requestMultiple(permissions: Array<Permissions>): Promise<Object> {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

async requestMultiple(permissions: Array): Promise<Record<string, GrantStatus>?

@Louis-C7 Louis-C7 merged commit 3bbb0a4 into react-native-oh-library:sig May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants