Skip to content

Commit fed431b

Browse files
Khader-1gnprice
authored andcommitted
autocomplete [nfc]: Factor out _testName filtering helper
As we start adding more features 'MentionAutocompleteQuery.testUser' would get confusing, This commit factors out _testName helper which is then used inside testUser.
1 parent 3c7aa8a commit fed431b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/model/autocomplete.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,11 @@ class MentionAutocompleteQuery {
287287

288288
bool testUser(User user, AutocompleteDataCache cache) {
289289
// TODO(#236) test email too, not just name
290+
291+
return _testName(user, cache);
292+
}
293+
294+
bool _testName(User user, AutocompleteDataCache cache) {
290295
// TODO(#237) test with diacritics stripped, where appropriate
291296

292297
final List<String> nameWords = cache.nameWordsForUser(user);

0 commit comments

Comments
 (0)