Fix: preserve selection on delete/archive in dashboard and search #7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/selection-on-delete"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
When deleting or archiving a thread in the dashboard or search panels, the selection disappeared and pressing
j/kwould jump to the top of the list.Root Cause
_debounced_refresh()always called_select_first_thread(), ignoring the current positionrefresh()fell back to_select_first_row()when the deleted thread ID was no longer in the modelFix
_refresh_pending_rowattribute — set before triggeringupdate_single_threadin delete/archive/archive-to-local paths._debounced_refresh()now reads this and calls_select_near_row()to land on the item that took the deleted item's place (or the last item if it was the last one)_select_near_row()and_select_last_thread()helpersrefresh()now falls back to row-position clamping (_select_near_row) instead of always selecting first row when thread ID is gone_select_near_row()helperBehavior After Fix
Pull request closed