Skip to content

Commit 8c2dfe7

Browse files
chrisbobbegnprice
authored andcommitted
emoji [nfc]: Move popularEmojiCandidates implementation down out of mixin
1 parent 0522158 commit 8c2dfe7

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

lib/model/emoji.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,7 @@ mixin EmojiStore {
115115
///
116116
/// See description in the web code:
117117
/// https://github.com/zulip/zulip/blob/83a121c7e/web/shared/src/typeahead.ts#L3-L21
118-
Iterable<EmojiCandidate> popularEmojiCandidates() {
119-
return EmojiStoreImpl._popularCandidates;
120-
}
118+
Iterable<EmojiCandidate> popularEmojiCandidates();
121119

122120
Iterable<EmojiCandidate> allEmojiCandidates();
123121

@@ -216,6 +214,11 @@ class EmojiStoreImpl extends PerAccountStoreBase with EmojiStore {
216214

217215
static final _popularCandidates = _generatePopularCandidates();
218216

217+
@override
218+
Iterable<EmojiCandidate> popularEmojiCandidates() {
219+
return _popularCandidates;
220+
}
221+
219222
static List<EmojiCandidate> _generatePopularCandidates() {
220223
EmojiCandidate candidate(String emojiCode, List<String> names) {
221224
final emojiName = names.removeAt(0);

lib/model/store.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,9 @@ class PerAccountStore extends PerAccountStoreBase with ChangeNotifier, EmojiStor
611611
notifyListeners();
612612
}
613613

614+
@override
615+
Iterable<EmojiCandidate> popularEmojiCandidates() => _emoji.popularEmojiCandidates();
616+
614617
@override
615618
Iterable<EmojiCandidate> allEmojiCandidates() => _emoji.allEmojiCandidates();
616619

0 commit comments

Comments
 (0)