mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
FIX: emoji-picker minor improvements (#30645)
- uses emojiSearch to ensure we have the same result than autocomplete when filtering emojis (for example search aliases were not working correctly because of this) - reset the visible sections when clearing filter to ensure we are not attempting to display all the emojis at once which would be slow - prevents flashing of the full emoji list before showing filtered results - correctly reset recent favorites and only show them when used
This commit is contained in:
@ -28,6 +28,7 @@ const REDUCED_WIDTH_THRESHOLD = 500;
|
||||
export default class ChatMessageActionsDesktop extends Component {
|
||||
@service chat;
|
||||
@service site;
|
||||
@service siteSettings;
|
||||
@service emojiStore;
|
||||
|
||||
@tracked size = FULL;
|
||||
@ -35,8 +36,13 @@ export default class ChatMessageActionsDesktop extends Component {
|
||||
popper = null;
|
||||
|
||||
get favoriteReactions() {
|
||||
const defaultReactions = this.siteSettings.default_emoji_reactions
|
||||
.split("|")
|
||||
.filter(Boolean);
|
||||
|
||||
return this.emojiStore
|
||||
.favoritesForContext(`channel_${this.message.channel.id}`)
|
||||
.concat(defaultReactions)
|
||||
.slice(0, 3)
|
||||
.map(
|
||||
(emoji) =>
|
||||
|
Reference in New Issue
Block a user