Show loading if permissions change

This commit is contained in:
Hillel Coren 2021-02-18 22:42:28 +02:00
parent fbc24432f2
commit dfeccf68bd
1 changed files with 5 additions and 1 deletions

View File

@ -76,8 +76,12 @@ class MainScreen extends StatelessWidget {
String mainRoute = '/' + uiState.mainRoute;
Widget screen = BlankScreen();
// This can happen if the user's permissions are changed
if (state.authState.isAuthenticated && state.companies.isEmpty) {
return LoadingIndicator();
return Container(
child: LoadingIndicator(),
color: Theme.of(context).cardColor,
);
}
bool editingFilterEntity = false;