Change summary
src/cheogram/java/com/cheogram/android/EmojiSearch.java | 5
src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | 5
2 files changed, 7 insertions(+), 3 deletions(-)
Detailed changes
@@ -175,9 +175,10 @@ public class EmojiSearch {
protected final String source;
protected final Drawable icon;
- public CustomEmoji(final String shortcode, final String source, final Drawable icon) {
- super(null, 10, shortcode);
+ public CustomEmoji(final String shortcode, final String source, final Drawable icon, final String tag) {
+ super(null, 10, shortcode + ">" + tag);
shortcodes.add(shortcode);
+ if (tag != null) tags.add(tag);
this.source = source;
this.icon = icon;
if (icon == null) {
@@ -757,7 +757,10 @@ public class XmppConnectionService extends Service {
}
final String filename = Files.getNameWithoutExtension(df.getName());
Cid[] cids = fileBackend.calculateCids(new FileInputStream(df));
- emojiSearch.addEmoji(new EmojiSearch.CustomEmoji(filename, cids[0].toString(), icon));
+ for (Cid cid : cids) {
+ saveCid(cid, file);
+ }
+ emojiSearch.addEmoji(new EmojiSearch.CustomEmoji(filename, cids[0].toString(), icon, file.getParentFile().getName()));
}
} catch (final Exception e) {
Log.w(Config.LOGTAG, "rescanStickers: " + e);