fix: load custom emoji pack

This commit is contained in:
xtaodada 2024-05-07 17:38:28 +08:00
parent c2769d94bf
commit 13ee55657a
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -391,6 +391,7 @@ public class EmojiHelper extends BaseRemoteHelper implements NotificationCenter.
public ArrayList<EmojiPackInfo> getEmojiPacksInfo() {
return emojiPacksInfo.parallelStream()
.filter(Objects::nonNull)
.filter(e -> e instanceof EmojiPackInfo)
.map(e -> (EmojiPackInfo) e)
.filter(e -> e.getFileDocument() != null && e.getPreviewDocument() != null)
@ -399,6 +400,7 @@ public class EmojiHelper extends BaseRemoteHelper implements NotificationCenter.
public ArrayList<EmojiPackBase> getEmojiCustomPacksInfo() {
return emojiPacksInfo.parallelStream()
.filter(Objects::nonNull)
.filter(e -> !(e instanceof EmojiPackInfo))
.filter(e -> !e.getPackId().equals(pendingDeleteEmojiPackId))
.collect(Collectors.toCollection(ArrayList::new));