Display message on language not supported (online)
This commit is contained in:
parent
f3ea3fbcf2
commit
d2e76a37fd
@ -78,13 +78,7 @@ class _ConfigurationsListState extends State<ConfigurationsList> {
|
||||
builder: (context) =>
|
||||
VisitPage(configurationId: configurations[index].id!, isAlreadyAllowed: visitAppContext.isScanBeaconAlreadyAllowed),
|
||||
));
|
||||
/*Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => VisitPage(configurationId: configurations[index].id!)
|
||||
),
|
||||
);*/
|
||||
/**/
|
||||
|
||||
}
|
||||
} else {
|
||||
if (configurations[index].isOffline!) {
|
||||
@ -97,16 +91,19 @@ class _ConfigurationsListState extends State<ConfigurationsList> {
|
||||
);
|
||||
} else {
|
||||
// Online mode
|
||||
// Update context
|
||||
if(!configurations[index].languages!.contains(visitAppContext.language))
|
||||
{
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(TranslationHelper.getFromLocale(
|
||||
"languageNotSupported", appContext.getContext())),
|
||||
backgroundColor: kBlue2),
|
||||
);
|
||||
} else {
|
||||
visitAppContext.configuration = configurations[index];
|
||||
visitAppContext.sectionIds = configurations[index].sectionIds;
|
||||
|
||||
/*Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => VisitPage(configurationId: configurations[index].id!)
|
||||
),
|
||||
);*/
|
||||
appContext.setContext(visitAppContext);
|
||||
|
||||
Navigator.of(context).pushReplacement(MaterialPageRoute(
|
||||
builder: (context) =>
|
||||
@ -114,6 +111,7 @@ class _ConfigurationsListState extends State<ConfigurationsList> {
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
height: size.height * 0.15,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user