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