Commit e92a779cbb192b4db12c3972a692fe384b8cb71d
fix error where button state isn\'t properly tracked in queue
Ev Bogue committed on 11/12/2018, 7:34:30 PMParent: f37a22d0e5735c492bc3ad775666f1a96e290f9d
Files changed
tools.js | changed |
tools.js | ||
---|---|---|
@@ -187,12 +187,14 @@ | ||
187 | 187 | sbot.query({query: [{$filter: { value: { author: id, content: {type: 'queue', message: src.key}}}}], live: true}), |
188 | 188 | pull.drain(function (msg) { |
189 | 189 | if (msg.value) { |
190 | 190 | if (msg.value.content.queue == true) { |
191 | - queueButton.replaceChild(removeFromQueue, addToQueue) | |
191 | + queueButton.removeChild(queueButton.childNodes[0]) | |
192 | + queueButton.appendChild(removeFromQueue) | |
192 | 193 | } |
193 | 194 | if (msg.value.content.queue == false) { |
194 | - queueButton.replaceChild(addToQueue, removeFromQueue) | |
195 | + queueButton.removeChild(queueButton.childNodes[0]) | |
196 | + queueButton.appendChild(addToQueue) | |
195 | 197 | } |
196 | 198 | } |
197 | 199 | }) |
198 | 200 | ) |
Built with git-ssb-web