use of im.actor.core.api.ApiStickerCollection in project actor-platform by actorapp.
the class StickersActor method onStickerCollectionsChanged.
private void onStickerCollectionsChanged(List<ApiStickerCollection> updated) {
for (int i = 0; i < stickersStorage.getStickerPacks().size(); i++) {
StickerPack collection = stickersStorage.getStickerPacks().get(i);
for (ApiStickerCollection c : updated) {
if (c.getId() == collection.getId()) {
stickersStorage.getStickerPacks().set(i, new StickerPack(c));
break;
}
}
}
notifyVM();
saveStorage();
}
use of im.actor.core.api.ApiStickerCollection in project actor-platform by actorapp.
the class StickersActor method onOwnStickerCollectionChanged.
private void onOwnStickerCollectionChanged(List<ApiStickerCollection> ownStickers) {
stickersStorage.getStickerPacks().clear();
for (ApiStickerCollection collection : ownStickers) {
stickersStorage.getStickerPacks().add(new StickerPack(collection));
}
notifyVM();
saveStorage();
}
Aggregations