mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-25 06:19:22 +00:00
Fix issues with white theme & Forez join group screen
This commit is contained in:
parent
e6c645f1e8
commit
1129726bbd
@ -44,6 +44,8 @@ class _JoinGroupPaneBody extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class JoinGroupPaneBodyState extends State<_JoinGroupPaneBody> {
|
class JoinGroupPaneBodyState extends State<_JoinGroupPaneBody> {
|
||||||
|
final _key = GlobalKey<AsyncScreenWidgetState>();
|
||||||
|
|
||||||
List<Group> _groups;
|
List<Group> _groups;
|
||||||
int _currChoice;
|
int _currChoice;
|
||||||
|
|
||||||
@ -60,6 +62,7 @@ class JoinGroupPaneBodyState extends State<_JoinGroupPaneBody> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => AsyncScreenWidget(
|
Widget build(BuildContext context) => AsyncScreenWidget(
|
||||||
|
key: _key,
|
||||||
onReload: _load,
|
onReload: _load,
|
||||||
onBuild: onBuild,
|
onBuild: onBuild,
|
||||||
errorMessage: tr("Failed to load the list of Forez groups!"));
|
errorMessage: tr("Failed to load the list of Forez groups!"));
|
||||||
@ -107,7 +110,9 @@ class JoinGroupPaneBodyState extends State<_JoinGroupPaneBody> {
|
|||||||
_currGroup.registrationLevel != GroupRegistrationLevel.OPEN) ||
|
_currGroup.registrationLevel != GroupRegistrationLevel.OPEN) ||
|
||||||
_currGroup.membershipLevel == GroupMembershipLevel.PENDING) {
|
_currGroup.membershipLevel == GroupMembershipLevel.PENDING) {
|
||||||
await alert(context,
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
@ -117,6 +122,7 @@ class JoinGroupPaneBodyState extends State<_JoinGroupPaneBody> {
|
|||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
logError(e, s);
|
logError(e, s);
|
||||||
snack(context, tr("Failed to register to group!"));
|
snack(context, tr("Failed to register to group!"));
|
||||||
|
_key.currentState.refresh();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,10 @@ class _GroupAccessDeniedScreenState extends SafeState<GroupAccessDeniedScreen> {
|
|||||||
style: TextStyle(fontSize: 20),
|
style: TextStyle(fontSize: 20),
|
||||||
),
|
),
|
||||||
Spacer(),
|
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(),
|
Spacer(),
|
||||||
GroupMembershipWidget(
|
GroupMembershipWidget(
|
||||||
group: _group,
|
group: _group,
|
||||||
|
@ -140,6 +140,7 @@ class _GroupMembershipWidgetState extends SafeState<GroupMembershipWidget> {
|
|||||||
return RichText(
|
return RichText(
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
text: tr("Request membership"),
|
text: tr("Request membership"),
|
||||||
|
style: blackForWhiteTheme(),
|
||||||
recognizer: TapGestureRecognizer()
|
recognizer: TapGestureRecognizer()
|
||||||
..onTap = () => _requestMembership()),
|
..onTap = () => _requestMembership()),
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user