Composer: Re-fetch sticker sets when reconnecting (#1694)

This commit is contained in:
Alexander Zinchuk 2022-02-04 15:18:29 +01:00
parent 3fbcb41fe5
commit 41be7a8c0f

View File

@ -118,7 +118,6 @@ const Main: FC<StateProps> = ({
checkVersionNotification,
loadAppConfig,
} = getDispatch();
const isSynced = Boolean(lastSyncTime);
if (DEBUG && !DEBUG_isLogged) {
DEBUG_isLogged = true;
@ -156,7 +155,7 @@ const Main: FC<StateProps> = ({
// Sticker sets
useEffect(() => {
if (isSynced) {
if (lastSyncTime) {
if (!addedSetIds) {
loadStickerSets();
loadFavoriteStickers();
@ -164,7 +163,7 @@ const Main: FC<StateProps> = ({
loadAddedStickers();
}
}
}, [isSynced, addedSetIds, loadStickerSets, loadFavoriteStickers, loadAddedStickers]);
}, [lastSyncTime, addedSetIds, loadStickerSets, loadFavoriteStickers, loadAddedStickers]);
// Check version when service chat is ready
useEffect(() => {