调整按钮顺序

Signed-off-by: fanchenxuan <fanchenxuan@huawei.com>
This commit is contained in:
fanchenxuan 2023-12-04 15:16:25 +08:00
parent 71f5593459
commit ee0e054203

View File

@ -213,6 +213,11 @@ struct mediaDocumentItem {
);
} else if (this.currentGroup == 'LOCATION') {
this.selected = this.status ? Constants.PERMISSION_BAN : Constants.PERMISSION_ALLOWED_ONLY_DURING_USE;
if (this.permissions.includes(BACKGROUND_LOCATION_PERMISSION)) {
this.mediaDocListItem.push(
new MediaDocObj($r('app.string.always_allow'), this.permissions, Constants.PERMISSION_ALLOW)
);
}
if (this.permissions.includes(FUZZY_LOCATION_PERMISSION)) {
this.mediaDocListItem.push(
new MediaDocObj($r('app.string.allowed_only_during_use'), [FUZZY_LOCATION_PERMISSION], Constants.PERMISSION_ALLOWED_ONLY_DURING_USE)
@ -220,11 +225,6 @@ struct mediaDocumentItem {
} else {
this.noForeground = true;
}
if (this.permissions.includes(BACKGROUND_LOCATION_PERMISSION)) {
this.mediaDocListItem.push(
new MediaDocObj($r('app.string.always_allow'), this.permissions, Constants.PERMISSION_ALLOW)
);
}
} else {
this.mediaDocListItem.push(
new MediaDocObj($r('app.string.allow'), this.permissions, Constants.PERMISSION_ALLOW)