MiddleSearch and Payments: Fix attempt to set an outdated global (#5073)
This commit is contained in:
parent
09ddb6483f
commit
66ec9f5732
@ -228,6 +228,7 @@ addActionHandler('searchChatMediaMessages', (global, actions, payload): ActionRe
|
|||||||
if (!currentSearch) {
|
if (!currentSearch) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
global = getGlobal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void searchChatMedia(global,
|
void searchChatMedia(global,
|
||||||
|
|||||||
@ -472,6 +472,8 @@ addActionHandler('openGiveawayModal', async (global, actions, payload): Promise<
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
global = getGlobal();
|
||||||
|
|
||||||
const isOpen = Boolean(chatId);
|
const isOpen = Boolean(chatId);
|
||||||
|
|
||||||
global = updateTabState(global, {
|
global = updateTabState(global, {
|
||||||
@ -563,10 +565,10 @@ addActionHandler('openPremiumGiftModal', async (global, actions, payload): Promi
|
|||||||
const result = await callApi('fetchPremiumPromo');
|
const result = await callApi('fetchPremiumPromo');
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
global = getGlobal();
|
|
||||||
|
|
||||||
const gifts = await callApi('getPremiumGiftCodeOptions', {});
|
const gifts = await callApi('getPremiumGiftCodeOptions', {});
|
||||||
|
|
||||||
|
global = getGlobal();
|
||||||
|
|
||||||
global = updateTabState(global, {
|
global = updateTabState(global, {
|
||||||
giftModal: {
|
giftModal: {
|
||||||
isOpen: true,
|
isOpen: true,
|
||||||
@ -593,6 +595,8 @@ addActionHandler('openStarsGiftModal', async (global, actions, payload): Promise
|
|||||||
|
|
||||||
const starsGiftOptions = await callApi('getStarsGiftOptions', {});
|
const starsGiftOptions = await callApi('getStarsGiftOptions', {});
|
||||||
|
|
||||||
|
global = getGlobal();
|
||||||
|
|
||||||
global = updateTabState(global, {
|
global = updateTabState(global, {
|
||||||
starsGiftModal: {
|
starsGiftModal: {
|
||||||
isOpen: true,
|
isOpen: true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user