mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 01:01:55 +01:00
Fix unhiding one segment unhiding all
This commit is contained in:
parent
b25a0a4db1
commit
1ffe42771f
1 changed files with 5 additions and 1 deletions
|
@ -349,7 +349,11 @@ export default class Utils {
|
|||
currentVideoData.lastAccess = Date.now();
|
||||
const existingData = currentVideoData.segments.find((segment) => segment.uuid === UUIDHash);
|
||||
if (hidden === SponsorHideType.Visible) {
|
||||
delete allDownvotes[hashedVideoID];
|
||||
currentVideoData.segments.splice(currentVideoData.segments.indexOf(existingData), 1);
|
||||
|
||||
if (currentVideoData.segments.length === 0) {
|
||||
delete allDownvotes[hashedVideoID];
|
||||
}
|
||||
} else {
|
||||
if (existingData) {
|
||||
existingData.hidden = hidden;
|
||||
|
|
Loading…
Reference in a new issue