Composer: Re-fetch sticker sets when reconnecting (#1694)
This commit is contained in:
parent
3fbcb41fe5
commit
41be7a8c0f
@ -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(() => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user