Explorar o código

fix: EditSong had a few issues when clicking Save and next button

Kristian Vos %!s(int64=2) %!d(string=hai) anos
pai
achega
7cdddddb12
Modificáronse 1 ficheiros con 2 adicións e 10 borrados
  1. 2 10
      frontend/src/components/modals/EditSong/index.vue

+ 2 - 10
frontend/src/components/modals/EditSong/index.vue

@@ -47,14 +47,6 @@ const props = defineProps({
 	discogsAlbum: { type: Object, default: null }
 });
 
-const emit = defineEmits([
-	"error",
-	"flagSong",
-	"nextSong",
-	"close",
-	"toggleFlag"
-]);
-
 const editSongStore = useEditSongStore(props);
 const stationStore = useStationStore();
 const { socket } = useWebsocketsStore();
@@ -866,7 +858,7 @@ const save = (songToCopy, closeOrNext, saveButtonRefName, _newSong = false) => {
 				return;
 			}
 
-			if (bulk.value) emit("nextSong");
+			if (bulk.value) editNextSong();
 			else modalsStore.closeCurrentModal();
 		});
 	return socket.dispatch(`songs.update`, _song._id, _song, res => {
@@ -885,7 +877,7 @@ const save = (songToCopy, closeOrNext, saveButtonRefName, _newSong = false) => {
 
 		if (!closeOrNext) return;
 
-		if (bulk.value) emit("nextSong");
+		if (bulk.value) editNextSong();
 		else modalsStore.closeCurrentModal();
 	});
 };