addApp2 method
Future<LoggedIn>
addApp2(
- AccessBloc accessBloc,
- Map<
String, PagesAndDialogAccesss> accesses, - List<
DeterminedApp> apps, - AppModel newCurrentApp,
override
Implementation
@override
Future<LoggedIn> addApp2(
AccessBloc accessBloc,
Map<String, PagesAndDialogAccesss> accesses,
List<DeterminedApp> apps,
AppModel newCurrentApp) async {
var newAccesses = await AccessHelper.extendAccesses(
accessBloc, member, accesses, newCurrentApp, true);
var newApps = apps.map((v) => v).toList();
var privilegeLevel = _privilegeLevel(newCurrentApp.documentID, newAccesses);
var appIsBlocked = _isBlocked(newCurrentApp.documentID, newAccesses);
var homePage =
await getHomepage(newCurrentApp, appIsBlocked, privilegeLevel);
newApps.add(DeterminedApp(newCurrentApp, homePage));
return Future.value(LoggedIn._(
usr,
member,
postLoginAction,
newApps,
newAccesses,
subscribedToApps,
blockedMembers,
playstoreApp: playstoreApp,
newForceRefresh: forceRefresh,
));
}