feat: Implement hideAllStateEvents

This commit is contained in:
Christian Pauly 2020-12-12 09:27:17 +01:00
parent 240fcfb788
commit 721c0b2bfa
2 changed files with 6 additions and 1 deletions

View File

@ -16,6 +16,7 @@ abstract class AppConfig {
static bool renderHtml = false;
static bool hideRedactedEvents = false;
static bool hideUnknownEvents = false;
static const bool hideAllStateEvents = false;
static const String inviteLinkPrefix = 'https://matrix.to/#/';
static const String pushNotificationsChannelId = 'fluffychat_push';
static const String pushNotificationsChannelName = 'FluffyChat push channel';

View File

@ -3,13 +3,17 @@ import 'package:fluffychat/utils/matrix_locals.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import '../../app_config.dart';
class StateMessage extends StatelessWidget {
final Event event;
const StateMessage(this.event);
@override
Widget build(BuildContext context) {
if (event.type == EventTypes.Redaction) return Container();
if (event.type == EventTypes.Redaction || AppConfig.hideAllStateEvents) {
return Container();
}
return Padding(
padding: const EdgeInsets.only(
left: 8.0,