mirror of
https://github.com/imgfloat/server.git
synced 2026-02-05 03:39:26 +00:00
Fix visibility
This commit is contained in:
@@ -1955,15 +1955,20 @@ function updateVisibility(asset, hidden) {
|
||||
return r.json();
|
||||
}).then((updated) => {
|
||||
storeAsset(updated);
|
||||
let visibilityMessage = null;
|
||||
if (updated.hidden) {
|
||||
loopPlaybackState.set(updated.id, false);
|
||||
stopAudio(updated.id);
|
||||
showToast('Asset hidden from broadcast.', 'info');
|
||||
} else if (isAudioAsset(updated)) {
|
||||
playAudioFromCanvas(updated, true);
|
||||
showToast('Asset is now visible and active.', 'success');
|
||||
visibilityMessage = 'Asset is now visible and active.';
|
||||
} else {
|
||||
visibilityMessage = 'Asset is now visible.';
|
||||
}
|
||||
if (visibilityMessage) {
|
||||
showToast(visibilityMessage, 'success');
|
||||
}
|
||||
showToast('Asset is now visible.', 'success');
|
||||
updateRenderState(updated);
|
||||
drawAndList();
|
||||
}).catch(() => showToast('Unable to change visibility right now.', 'error'));
|
||||
|
||||
Reference in New Issue
Block a user