(List<EmoteSet> list)
| 12 | public class Autocomplete { |
| 13 | |
| 14 | public static void addOurEmotes(List<EmoteSet> list) { |
| 15 | for (EmoteSet set : list) { |
| 16 | if (set.getSetId().equals("bttv_emote_set_id")) { |
| 17 | return; |
| 18 | } |
| 19 | } |
| 20 | int channelId = Data.currentBroadcasterId; |
| 21 | if (list.isEmpty()) { |
| 22 | return; |
| 23 | } |
| 24 | ArrayList<String> codes = Emotes.getAllEmotes(channelId); |
| 25 | List<EmoteModel.Generic> generics = new ArrayList<>(codes.size()); |
| 26 | |
| 27 | for (String code : codes) { |
| 28 | Emote e = Emotes.getEmote(channelId, code); |
| 29 | if (e == null) |
| 30 | continue; // should not happen |
| 31 | generics.add( |
| 32 | new EmoteModel.Generic( |
| 33 | "BTTV-" + e.id, |
| 34 | e.code, |
| 35 | e.getAssetType(), |
| 36 | EmoteModelType.OTHER) |
| 37 | ); |
| 38 | } |
| 39 | EmoteSet set = new EmoteSet.GenericEmoteSet("bttv_emote_set_id", generics); |
| 40 | list.add(set); |
| 41 | } |
| 42 | } |
nothing calls this directly
no test coverage detected