Java Code Examples for org.telegram.messenger.NotificationCenter#stickersDidLoaded()

The following examples show how to use org.telegram.messenger.NotificationCenter#stickersDidLoaded() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StickersActivity.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void didReceivedNotification(int id, int account, Object... args) {
    if (id == NotificationCenter.stickersDidLoaded) {
        if ((Integer) args[0] == currentType) {
            updateRows();
        }
    } else if (id == NotificationCenter.featuredStickersDidLoaded) {
        if (listAdapter != null) {
            listAdapter.notifyItemChanged(0);
        }
    } else if (id == NotificationCenter.archivedStickersCountDidLoaded) {
        if ((Integer) args[0] == currentType) {
            updateRows();
        }
    }
}
 
Example 2
Source File: GroupStickersActivity.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void didReceivedNotification(int id, int account, Object... args) {
    if (id == NotificationCenter.stickersDidLoaded) {
        if ((Integer) args[0] == DataQuery.TYPE_IMAGE) {
            updateRows();
        }
    } else if (id == NotificationCenter.chatInfoDidLoaded) {
        TLRPC.ChatFull chatFull = (TLRPC.ChatFull) args[0];
        if (chatFull.id == chatId) {
            if (info == null && chatFull.stickerset != null) {
                selectedStickerSet = DataQuery.getInstance(currentAccount).getGroupStickerSetById(chatFull.stickerset);
            }
            info = chatFull;
            updateRows();
        }
    } else if (id == NotificationCenter.groupStickersDidLoaded) {
        long setId = (Long) args[0];
        if (info != null && info.stickerset != null && info.stickerset.id == id) {
            updateRows();
        }
    }
}
 
Example 3
Source File: StickerMasksView.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
@Override
public void didReceivedNotification(int id, int account, Object... args) {
    if (id == NotificationCenter.stickersDidLoaded) {
        if ((Integer) args[0] == currentType) {
            updateStickerTabs();
            reloadStickersAdapter();
            checkPanels();
        }
    } else if (id == NotificationCenter.recentDocumentsDidLoaded) {
        boolean isGif = (Boolean) args[0];
        if (!isGif && (Integer) args[1] == currentType) {
            checkDocuments();
        }
    }
}
 
Example 4
Source File: StickersActivity.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void didReceivedNotification(int id, int account, Object... args) {
    if (id == NotificationCenter.stickersDidLoaded) {
        if ((Integer) args[0] == currentType) {
            updateRows();
        }
    } else if (id == NotificationCenter.featuredStickersDidLoaded) {
        if (listAdapter != null) {
            listAdapter.notifyItemChanged(0);
        }
    } else if (id == NotificationCenter.archivedStickersCountDidLoaded) {
        if ((Integer) args[0] == currentType) {
            updateRows();
        }
    }
}
 
Example 5
Source File: GroupStickersActivity.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void didReceivedNotification(int id, int account, Object... args) {
    if (id == NotificationCenter.stickersDidLoaded) {
        if ((Integer) args[0] == DataQuery.TYPE_IMAGE) {
            updateRows();
        }
    } else if (id == NotificationCenter.chatInfoDidLoaded) {
        TLRPC.ChatFull chatFull = (TLRPC.ChatFull) args[0];
        if (chatFull.id == chatId) {
            if (info == null && chatFull.stickerset != null) {
                selectedStickerSet = DataQuery.getInstance(currentAccount).getGroupStickerSetById(chatFull.stickerset);
            }
            info = chatFull;
            updateRows();
        }
    } else if (id == NotificationCenter.groupStickersDidLoaded) {
        long setId = (Long) args[0];
        if (info != null && info.stickerset != null && info.stickerset.id == id) {
            updateRows();
        }
    }
}
 
Example 6
Source File: StickerMasksView.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
@Override
public void didReceivedNotification(int id, int account, Object... args) {
    if (id == NotificationCenter.stickersDidLoaded) {
        if ((Integer) args[0] == currentType) {
            updateStickerTabs();
            reloadStickersAdapter();
            checkPanels();
        }
    } else if (id == NotificationCenter.recentDocumentsDidLoaded) {
        boolean isGif = (Boolean) args[0];
        if (!isGif && (Integer) args[1] == currentType) {
            checkDocuments();
        }
    }
}
 
Example 7
Source File: FeaturedStickersActivity.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void didReceivedNotification(int id, int account, Object... args) {
    if (id == NotificationCenter.featuredStickersDidLoaded) {
        if (unreadStickers == null) {
            unreadStickers = DataQuery.getInstance(currentAccount).getUnreadStickerSets();
        }
        updateRows();
    } else if (id == NotificationCenter.stickersDidLoaded) {
        updateVisibleTrendingSets();
    }
}
 
Example 8
Source File: FeaturedStickersActivity.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void didReceivedNotification(int id, int account, Object... args) {
    if (id == NotificationCenter.featuredStickersDidLoaded) {
        if (unreadStickers == null) {
            unreadStickers = DataQuery.getInstance(currentAccount).getUnreadStickerSets();
        }
        updateRows();
    } else if (id == NotificationCenter.stickersDidLoaded) {
        updateVisibleTrendingSets();
    }
}