Skip to content

Commit e8728f5

Browse files
committed
emoji [nfc]: Move popularEmojiCandidates implementation down out of mixin
1 parent a60ff3f commit e8728f5

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

@@ -237,6 +235,11 @@ class EmojiStoreImpl extends PerAccountStoreBase with EmojiStore {
237235
];
238236
}
239237

238+
@override
239+
Iterable<EmojiCandidate> popularEmojiCandidates() {
240+
return _popularCandidates;
241+
}
242+
240243
/// Codes for the popular emoji, in order; all are Unicode emoji.
241244
// This list should match web:
242245
// https://github.com/zulip/zulip/blob/83a121c7e/web/shared/src/typeahead.ts#L22-L29

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)