fix(overview): mining addresses visible at 0 balance; drag-reorder always applies
- Address list: a mining-flagged address stays visible even at 0 balance when "hide zero balances" is on (payout addresses shouldn't vanish). - Drag-reorder: persist dense sort orders (0..N-1) for the whole visible list on drop via App::reorderAddresses, instead of a pairwise swap that no-ops when both rows are still at the default un-ordered state. First drag now always takes effect, and explicit order keeps overriding the starred/type/balance sort. - Tests: 0-balance mining row survives hide-zero; ordered non-favorite outranks a favorite. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -252,6 +252,10 @@ public:
|
||||
void setAddressSortOrder(const std::string& addr, int order);
|
||||
int getNextSortOrder() const;
|
||||
void swapAddressOrder(const std::string& a, const std::string& b);
|
||||
// Assign dense sort orders (0..N-1) to the given addresses in the given order and
|
||||
// persist once. Used by drag-reorder so a drop always takes effect (even from the
|
||||
// default un-ordered state, where a pairwise swap would be a no-op).
|
||||
void reorderAddresses(const std::vector<std::string>& orderedAddrs);
|
||||
bool isMiningAddress(const std::string& addr) const;
|
||||
void setMiningAddress(const std::string& addr, bool mining);
|
||||
void invalidateAddressValidationCache();
|
||||
|
||||
Reference in New Issue
Block a user