withOtherPrivilege method
Future<AccessDetermined>
withOtherPrivilege(
- AccessBloc accessBloc,
- AppModel app,
- PrivilegeLevel privilege,
- bool blocked,
override
Implementation
@override
Future<AccessDetermined> withOtherPrivilege(AccessBloc accessBloc,
AppModel app, PrivilegeLevel privilege, bool blocked) async {
var newAccesses = await AccessHelper.extendAccesses2(
accessBloc, member, accesses, app, true, privilege, blocked);
var newApps = apps.map((v) => v).toList();
newApps.removeWhere((element) => element.app.documentID == app.documentID);
var homePage = await getHomepage(app, blocked, privilege);
newApps.add(DeterminedApp(app, homePage));
return Future.value(LoggedIn._(
usr,
member,
postLoginAction,
newApps,
newAccesses,
subscribedToApps,
blockedMembers,
playstoreApp: playstoreApp,
newForceRefresh: forceRefresh,
));
}