Search in sources :

Example 1 with ApiStickerCollection

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();
}
Also used : ApiStickerCollection(im.actor.core.api.ApiStickerCollection) StickerPack(im.actor.core.entity.StickerPack)

Example 2 with ApiStickerCollection

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();
}
Also used : ApiStickerCollection(im.actor.core.api.ApiStickerCollection) StickerPack(im.actor.core.entity.StickerPack)

Aggregations

ApiStickerCollection (im.actor.core.api.ApiStickerCollection)2 StickerPack (im.actor.core.entity.StickerPack)2