feat: Implement polls
This commit is contained in:
parent
f3ea64086b
commit
71fa853f05
12 changed files with 582 additions and 63 deletions
|
|
@ -16,8 +16,8 @@ extension IsStateExtension on Event {
|
|||
// always filter out edit and reaction relationships
|
||||
!{RelationshipTypes.edit, RelationshipTypes.reaction}
|
||||
.contains(relationshipType) &&
|
||||
// always filter out m.key.* events
|
||||
!type.startsWith('m.key.verification.') &&
|
||||
// always filter out m.key.* and other known but unimportant events
|
||||
!isKnownHiddenStates &&
|
||||
// event types to hide: redaction and reaction events
|
||||
// if a reaction has been redacted we also want it to be hidden in the timeline
|
||||
!{EventTypes.Reaction, EventTypes.Redaction}.contains(type) &&
|
||||
|
|
@ -39,4 +39,10 @@ extension IsStateExtension on Event {
|
|||
EventTypes.RoomCreate,
|
||||
EventTypes.RoomTombstone,
|
||||
}.contains(type);
|
||||
|
||||
bool get isKnownHiddenStates =>
|
||||
{
|
||||
PollEventContent.responseType,
|
||||
}.contains(type) ||
|
||||
type.startsWith('m.key.verification.');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -363,4 +363,10 @@ class MatrixLocals extends MatrixLocalizations {
|
|||
|
||||
@override
|
||||
String get refreshingLastEvent => l10n.loadingPleaseWait;
|
||||
|
||||
@override
|
||||
String startedAPoll(String senderName) => '$senderName started a poll';
|
||||
|
||||
@override
|
||||
String get pollHasBeenEnded => l10n.pollHasBeenEnded;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue