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:
@@ -2094,6 +2094,14 @@ void App::swapAddressOrder(const std::string& a, const std::string& b)
|
||||
}
|
||||
}
|
||||
|
||||
void App::reorderAddresses(const std::vector<std::string>& orderedAddrs)
|
||||
{
|
||||
if (!settings_) return;
|
||||
for (size_t i = 0; i < orderedAddrs.size(); ++i)
|
||||
settings_->setAddressSortOrder(orderedAddrs[i], static_cast<int>(i));
|
||||
settings_->save();
|
||||
}
|
||||
|
||||
bool App::isMiningAddress(const std::string& addr) const
|
||||
{
|
||||
return settings_ && settings_->isMiningAddress(addr);
|
||||
|
||||
Reference in New Issue
Block a user