Skip to content

Commit

Permalink
Improve delete thumb after un/block
Browse files Browse the repository at this point in the history
  • Loading branch information
fgl27 committed Aug 7, 2023
1 parent 7ea938e commit 3762525
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions app/specific/Screens.js
Original file line number Diff line number Diff line change
Expand Up @@ -3181,6 +3181,10 @@ function Screens_BlockChannel(key) {
if (Screens_getChannelIsBlocked(channelId)) {
delete Main_values_History_data[AddUser_UsernameArray[0].id].blocked.channel[channelId];

if (ScreenObj[key].screen === Main_Blocked) {
Screens_deleteUpdateRows(key);
}

if (channelName) {
Main_EventBlocked('unblocked_channel', channelName);
}
Expand All @@ -3200,12 +3204,24 @@ function Screens_BlockChannel(key) {
}

Screens_BlockChannelUpdateInfo(channelId);

Screens_BlockCheckDeleteChannel(key);
}

Screens_deleteUpdateRows(key);
Main_setHistoryItem();
}

function Screens_BlockCheckDeleteChannel(key) {
if (
ScreenObj[key].screen !== Main_Blocked &&
ScreenObj[key].screen !== Main_ChannelClip &&
ScreenObj[key].screen !== Main_ChannelVod &&
!ScreenObj[key].IsUser
) {
Screens_deleteUpdateRows(key);
}
}

function Screens_BlockChannelGetId(key) {
var channelId;

Expand Down Expand Up @@ -3326,6 +3342,10 @@ function Screens_BlockGame(key) {
if (Screens_getGameIsBlocked(gameId)) {
delete Main_values_History_data[AddUser_UsernameArray[0].id].blocked.game[gameId];

if (ScreenObj[key].screen === Main_Blocked) {
Screens_deleteUpdateRows(key);
}

if (gameName) {
Main_EventBlocked('unblocked_game', gameName);
}
Expand All @@ -3346,12 +3366,25 @@ function Screens_BlockGame(key) {
}

Screens_BlockGameUpdateInfo(gameId);

Screens_BlockCheckDeleteGame(key);
}

Screens_deleteUpdateRows(key);
Main_setHistoryItem();
}

function Screens_BlockCheckDeleteGame(key) {
if (
ScreenObj[key].screen !== Main_Blocked &&
ScreenObj[key].screen !== Main_aGame &&
ScreenObj[key].screen !== Main_AGameVod &&
ScreenObj[key].screen !== Main_AGameClip &&
!ScreenObj[key].IsUser
) {
Screens_deleteUpdateRows(key);
}
}

function Screens_BlockGameGetId(key) {
var gameId;

Expand Down

0 comments on commit 3762525

Please sign in to comment.