From d36a97286458e6517f1b9048b21a65d265cb2e85 Mon Sep 17 00:00:00 2001 From: Rafostar <40623528+Rafostar@users.noreply.github.com> Date: Tue, 19 Jan 2021 21:07:24 +0100 Subject: [PATCH] Simplify playlist drop callback Use value passed to the callback instead of target property --- clapper_src/playlist.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clapper_src/playlist.js b/clapper_src/playlist.js index b0ec49d1..7060e93b 100644 --- a/clapper_src/playlist.js +++ b/clapper_src/playlist.js @@ -188,7 +188,7 @@ class ClapperPlaylistItem extends Gtk.ListBoxRow _onDrop(target, value, x, y) { const destIndex = this.get_index(); - const targetIndex = target.value.get_index(); + const targetIndex = value.get_index(); if(destIndex === targetIndex) return true; @@ -196,8 +196,8 @@ class ClapperPlaylistItem extends Gtk.ListBoxRow const listBox = this.get_ancestor(Gtk.ListBox); if(listBox && destIndex >= 0) { - listBox.remove(target.value); - listBox.insert(target.value, destIndex); + listBox.remove(value); + listBox.insert(value, destIndex); return true; }