1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-24 22:09:21 +00:00

Fix issues with white theme & Forez join group screen

This commit is contained in:
Pierre HUBERT 2021-04-23 19:41:14 +02:00
parent e6c645f1e8
commit 1129726bbd
3 changed files with 12 additions and 2 deletions

View File

@ -44,6 +44,8 @@ class _JoinGroupPaneBody extends StatefulWidget {
}
class JoinGroupPaneBodyState extends State<_JoinGroupPaneBody> {
final _key = GlobalKey<AsyncScreenWidgetState>();
List<Group> _groups;
int _currChoice;
@ -60,6 +62,7 @@ class JoinGroupPaneBodyState extends State<_JoinGroupPaneBody> {
@override
Widget build(BuildContext context) => AsyncScreenWidget(
key: _key,
onReload: _load,
onBuild: onBuild,
errorMessage: tr("Failed to load the list of Forez groups!"));
@ -107,7 +110,9 @@ class JoinGroupPaneBodyState extends State<_JoinGroupPaneBody> {
_currGroup.registrationLevel != GroupRegistrationLevel.OPEN) ||
_currGroup.membershipLevel == GroupMembershipLevel.PENDING) {
await alert(context,
tr("You can not access this group yet, please wait for a member of the group to accept your request. Hopefully this will not be too long. Please check back soon!"));
tr("You can not access this group yet, please wait for a member of the group to accept your request.\nHopefully this will not be too long.\nPlease check back soon!"));
_key.currentState.refresh();
return false;
}
@ -117,6 +122,7 @@ class JoinGroupPaneBodyState extends State<_JoinGroupPaneBody> {
} catch (e, s) {
logError(e, s);
snack(context, tr("Failed to register to group!"));
_key.currentState.refresh();
return false;
}
}

View File

@ -68,7 +68,10 @@ class _GroupAccessDeniedScreenState extends SafeState<GroupAccessDeniedScreen> {
style: TextStyle(fontSize: 20),
),
Spacer(),
Text(tr("A registration is required to access this group page.")),
Text(
tr("A registration is required to access this group page."),
textAlign: TextAlign.center,
),
Spacer(),
GroupMembershipWidget(
group: _group,

View File

@ -140,6 +140,7 @@ class _GroupMembershipWidgetState extends SafeState<GroupMembershipWidget> {
return RichText(
text: TextSpan(
text: tr("Request membership"),
style: blackForWhiteTheme(),
recognizer: TapGestureRecognizer()
..onTap = () => _requestMembership()),
);