From ec07043d3ca9bd88d45568c5fe7b5e1ee52c56a1 Mon Sep 17 00:00:00 2001 From: Sayed Mahmood Sayedi Date: Mon, 25 Mar 2024 22:32:57 +0430 Subject: [PATCH] autocomplete [nfc]: Delete wildcard and user-group result subclasses The WildcardMentionAutocompleteResult and UserGroupMentionAutocompleteResult classes are not used, so better to remove them for now. --- lib/model/autocomplete.dart | 19 ++----------------- lib/widgets/autocomplete.dart | 8 -------- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/lib/model/autocomplete.dart b/lib/model/autocomplete.dart index fda2cba197..f1351ef28e 100644 --- a/lib/model/autocomplete.dart +++ b/lib/model/autocomplete.dart @@ -342,21 +342,6 @@ class UserMentionAutocompleteResult extends MentionAutocompleteResult { final int userId; } -enum WildcardMentionType { - all, - everyone, - stream, -} - -class WildcardMentionAutocompleteResult extends MentionAutocompleteResult { - WildcardMentionAutocompleteResult({required this.type}); - - final WildcardMentionType type; -} +// TODO(#233): // class UserGroupMentionAutocompleteResult extends MentionAutocompleteResult { - -class UserGroupMentionAutocompleteResult extends MentionAutocompleteResult { - UserGroupMentionAutocompleteResult({required this.userGroupId}); - - final int userGroupId; -} +// TODO(#234): // class WildcardMentionAutocompleteResult extends MentionAutocompleteResult { diff --git a/lib/widgets/autocomplete.dart b/lib/widgets/autocomplete.dart index 773a741efe..ba5dea1b84 100644 --- a/lib/widgets/autocomplete.dart +++ b/lib/widgets/autocomplete.dart @@ -107,10 +107,6 @@ class _ComposeAutocompleteState extends State with PerAccou // TODO(i18n) language-appropriate space character; check active keyboard? // (maybe handle centrally in `widget.controller`) replacementString = '${mention(store.users[userId]!, silent: intent.query.silent, users: store.users)} '; - case WildcardMentionAutocompleteResult(): - replacementString = '[unimplemented]'; // TODO(#234) - case UserGroupMentionAutocompleteResult(): - replacementString = '[unimplemented]'; // TODO(#233) } widget.controller.value = intent.textEditingValue.replaced( @@ -128,10 +124,6 @@ class _ComposeAutocompleteState extends State with PerAccou case UserMentionAutocompleteResult(:var userId): // TODO(#227) avatar label = PerAccountStoreWidget.of(context).users[userId]!.fullName; - case WildcardMentionAutocompleteResult(): - label = '[unimplemented]'; // TODO(#234) - case UserGroupMentionAutocompleteResult(): - label = '[unimplemented]'; // TODO(#233) } return InkWell( onTap: () {