mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 12:59:21 +00:00
Fix theme color
This commit is contained in:
parent
bd794f8079
commit
e31c91a55c
@ -52,7 +52,7 @@ class _GroupMembershipWidgetState extends SafeState<GroupMembershipWidget> {
|
||||
return _buildVisitorState();
|
||||
|
||||
default:
|
||||
throw Exception("Unkonwn grou pmembership level state: $_level");
|
||||
throw Exception("Unkonwn group pmembership level state: $_level");
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ class _GroupMembershipWidgetState extends SafeState<GroupMembershipWidget> {
|
||||
WidgetSpan(
|
||||
child: Icon(Icons.info_outline, size: 12),
|
||||
alignment: PlaceholderAlignment.middle),
|
||||
TextSpan(text: " " + tr("Invited") + " "),
|
||||
TextSpan(text: " " + tr("Invited") + " ", style: blackForWhiteTheme()),
|
||||
TextSpan(
|
||||
text: tr("Accept"),
|
||||
style: TextStyle(color: Colors.green),
|
||||
@ -107,7 +107,8 @@ class _GroupMembershipWidgetState extends SafeState<GroupMembershipWidget> {
|
||||
WidgetSpan(
|
||||
child: Icon(Icons.access_time, size: 12),
|
||||
alignment: PlaceholderAlignment.middle),
|
||||
TextSpan(text: " " + tr("Requested") + " "),
|
||||
TextSpan(
|
||||
text: " " + tr("Requested") + " ", style: blackForWhiteTheme()),
|
||||
TextSpan(
|
||||
text: tr("Cancel"),
|
||||
style: TextStyle(color: Colors.blue),
|
||||
@ -132,7 +133,6 @@ class _GroupMembershipWidgetState extends SafeState<GroupMembershipWidget> {
|
||||
|
||||
/// Build visitor state
|
||||
Widget _buildVisitorState() {
|
||||
|
||||
// Check if the user can request membership
|
||||
if (group.registrationLevel == GroupRegistrationLevel.CLOSED)
|
||||
return Text(tr("Closed registration"));
|
||||
|
@ -274,3 +274,7 @@ void applyNewThemeSettings(BuildContext context) =>
|
||||
|
||||
/// Parse emojies
|
||||
String parseEmojies(String input) => EmojiParser().emojify(input);
|
||||
|
||||
/// Create a white text style for dart heme and a black text otherwise
|
||||
TextStyle blackForWhiteTheme() =>
|
||||
TextStyle(color: darkTheme() ? Colors.white : Colors.black);
|
||||
|
Loading…
Reference in New Issue
Block a user