Monetization: Fix Tab reset (#5101)
This commit is contained in:
parent
e40a91ca7d
commit
6ab84ff12f
@ -104,11 +104,20 @@ const MonetizationStatistics = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (containerRef.current) {
|
||||||
|
Array.from(containerRef.current.children).forEach((child) => {
|
||||||
|
child.innerHTML = '';
|
||||||
|
child.classList.add(styles.hidden);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
loadedCharts.current = [];
|
||||||
|
|
||||||
if (!statistics || !containerRef.current) {
|
if (!statistics || !containerRef.current) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MONETIZATION_GRAPHS.filter(Boolean).forEach((name, index: number) => {
|
MONETIZATION_GRAPHS.forEach((name, index: number) => {
|
||||||
const graph = statistics[name as keyof typeof statistics];
|
const graph = statistics[name as keyof typeof statistics];
|
||||||
const isAsync = typeof graph === 'string';
|
const isAsync = typeof graph === 'string';
|
||||||
|
|
||||||
|
|||||||
@ -63,6 +63,7 @@ addActionHandler('processOpenChatOrThread', (global, actions, payload): ActionRe
|
|||||||
|
|
||||||
global = updateTabState(global, {
|
global = updateTabState(global, {
|
||||||
isStatisticsShown: false,
|
isStatisticsShown: false,
|
||||||
|
monetizationStatistics: undefined,
|
||||||
boostStatistics: undefined,
|
boostStatistics: undefined,
|
||||||
contentToBeScheduled: undefined,
|
contentToBeScheduled: undefined,
|
||||||
...(chatId !== selectTabState(global, tabId).forwardMessages.toChatId && {
|
...(chatId !== selectTabState(global, tabId).forwardMessages.toChatId && {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user