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) {
|
||||
return;
|
||||
}
|
||||
global = getGlobal();
|
||||
}
|
||||
|
||||
void searchChatMedia(global,
|
||||
|
||||
@ -472,6 +472,8 @@ addActionHandler('openGiveawayModal', async (global, actions, payload): Promise<
|
||||
return;
|
||||
}
|
||||
|
||||
global = getGlobal();
|
||||
|
||||
const isOpen = Boolean(chatId);
|
||||
|
||||
global = updateTabState(global, {
|
||||
@ -563,10 +565,10 @@ addActionHandler('openPremiumGiftModal', async (global, actions, payload): Promi
|
||||
const result = await callApi('fetchPremiumPromo');
|
||||
if (!result) return;
|
||||
|
||||
global = getGlobal();
|
||||
|
||||
const gifts = await callApi('getPremiumGiftCodeOptions', {});
|
||||
|
||||
global = getGlobal();
|
||||
|
||||
global = updateTabState(global, {
|
||||
giftModal: {
|
||||
isOpen: true,
|
||||
@ -593,6 +595,8 @@ addActionHandler('openStarsGiftModal', async (global, actions, payload): Promise
|
||||
|
||||
const starsGiftOptions = await callApi('getStarsGiftOptions', {});
|
||||
|
||||
global = getGlobal();
|
||||
|
||||
global = updateTabState(global, {
|
||||
starsGiftModal: {
|
||||
isOpen: true,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user