Skip to content

Commit

Permalink
autocomplete [nfc]: Delete wildcard and user-group result subclasses
Browse files Browse the repository at this point in the history
The WildcardMentionAutocompleteResult and
UserGroupMentionAutocompleteResult classes are not
used, so better to remove them for now.
  • Loading branch information
sm-sayedi committed Mar 26, 2024
1 parent 79a7384 commit ec07043
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
19 changes: 2 additions & 17 deletions lib/model/autocomplete.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
8 changes: 0 additions & 8 deletions lib/widgets/autocomplete.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ class _ComposeAutocompleteState extends State<ComposeAutocomplete> 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(
Expand All @@ -128,10 +124,6 @@ class _ComposeAutocompleteState extends State<ComposeAutocomplete> 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: () {
Expand Down

0 comments on commit ec07043

Please sign in to comment.