mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-12 16:23:32 +01:00
Verifies downloaded app’s permissions match source
Renames source JSON permissions key to “appPermissions” in order to preserve backwards compatibility, since we’ve changed the schema for permissions.
This commit is contained in:
@@ -177,11 +177,14 @@ private extension AppContentViewController
|
||||
|
||||
func makePermissionsDataSource() -> RSTArrayCollectionViewDataSource<AppPermission>
|
||||
{
|
||||
let dataSource = RSTArrayCollectionViewDataSource(items: self.app.permissions)
|
||||
let dataSource = RSTArrayCollectionViewDataSource(items: Array(self.app.permissions))
|
||||
dataSource.cellConfigurationHandler = { (cell, permission, indexPath) in
|
||||
let cell = cell as! PermissionCollectionViewCell
|
||||
cell.button.setImage(permission.type.icon, for: .normal)
|
||||
cell.textLabel.text = permission.type.localizedShortName
|
||||
|
||||
let icon = UIImage(systemName: permission.symbolName ?? "lock")
|
||||
cell.button.setImage(icon, for: .normal)
|
||||
|
||||
cell.textLabel.text = permission.localizedDisplayName
|
||||
}
|
||||
|
||||
return dataSource
|
||||
|
||||
Reference in New Issue
Block a user