From a5d3b710eb46e58708b8dbb51f5231ba534561fd Mon Sep 17 00:00:00 2001 From: Florrie Date: Wed, 18 Sep 2019 17:56:11 -0300 Subject: Don't reload the listing if it's unnecessary ...in reveal(). This fixes the bug where the revealed track would always be positioned at the bottom of the screen, which happened because reloading the listing reset the scroll index back to the top. --- ui.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ui.js') diff --git a/ui.js b/ui.js index 7ef13f0..aafe064 100644 --- a/ui.js +++ b/ui.js @@ -513,10 +513,14 @@ class AppElement extends FocusElement { const tabberListing = this.tabber.currentElement this.root.select(tabberListing) + + const parent = item[parentSymbol] if (isGroup(item)) { tabberListing.loadGrouplike(item) - } else if (item[parentSymbol]) { - tabberListing.loadGrouplike(item[parentSymbol]) + } else if (parent) { + if (tabberListing.grouplike !== parent) { + tabberListing.loadGrouplike(parent) + } tabberListing.selectAndShow(item) } } -- cgit 1.3.0-6-gf8a5