mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2026-01-31 23:01:07 +03:00
Fix unhiding one segment unhiding all
This commit is contained in:
@@ -349,7 +349,11 @@ export default class Utils {
|
|||||||
currentVideoData.lastAccess = Date.now();
|
currentVideoData.lastAccess = Date.now();
|
||||||
const existingData = currentVideoData.segments.find((segment) => segment.uuid === UUIDHash);
|
const existingData = currentVideoData.segments.find((segment) => segment.uuid === UUIDHash);
|
||||||
if (hidden === SponsorHideType.Visible) {
|
if (hidden === SponsorHideType.Visible) {
|
||||||
|
currentVideoData.segments.splice(currentVideoData.segments.indexOf(existingData), 1);
|
||||||
|
|
||||||
|
if (currentVideoData.segments.length === 0) {
|
||||||
delete allDownvotes[hashedVideoID];
|
delete allDownvotes[hashedVideoID];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (existingData) {
|
if (existingData) {
|
||||||
existingData.hidden = hidden;
|
existingData.hidden = hidden;
|
||||||
|
|||||||
Reference in New Issue
Block a user