mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-18 19:02:34 +01:00
feat: Implement hideAllStateEvents
This commit is contained in:
parent
240fcfb788
commit
721c0b2bfa
@ -16,6 +16,7 @@ abstract class AppConfig {
|
|||||||
static bool renderHtml = false;
|
static bool renderHtml = false;
|
||||||
static bool hideRedactedEvents = false;
|
static bool hideRedactedEvents = false;
|
||||||
static bool hideUnknownEvents = false;
|
static bool hideUnknownEvents = false;
|
||||||
|
static const bool hideAllStateEvents = false;
|
||||||
static const String inviteLinkPrefix = 'https://matrix.to/#/';
|
static const String inviteLinkPrefix = 'https://matrix.to/#/';
|
||||||
static const String pushNotificationsChannelId = 'fluffychat_push';
|
static const String pushNotificationsChannelId = 'fluffychat_push';
|
||||||
static const String pushNotificationsChannelName = 'FluffyChat push channel';
|
static const String pushNotificationsChannelName = 'FluffyChat push channel';
|
||||||
|
@ -3,13 +3,17 @@ import 'package:fluffychat/utils/matrix_locals.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||||
|
|
||||||
|
import '../../app_config.dart';
|
||||||
|
|
||||||
class StateMessage extends StatelessWidget {
|
class StateMessage extends StatelessWidget {
|
||||||
final Event event;
|
final Event event;
|
||||||
const StateMessage(this.event);
|
const StateMessage(this.event);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (event.type == EventTypes.Redaction) return Container();
|
if (event.type == EventTypes.Redaction || AppConfig.hideAllStateEvents) {
|
||||||
|
return Container();
|
||||||
|
}
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
left: 8.0,
|
left: 8.0,
|
||||||
|
Loading…
Reference in New Issue
Block a user