Repository navigation
fix(ui): preserve controls during remote refresh #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5b292ba
97a0fd5
2dd0dfd
b24e766
3335358
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1719,7 +1719,14 @@ on_selection_changed (GtkSingleSelection *selection, | |
| if (row != NULL) | ||
| node = gtk_tree_list_row_get_item (row); | ||
|
|
||
| if (node == self->selected) | ||
| /* | ||
| * Reconciliation can remove and reinsert the selected row in one main-loop | ||
| * turn. GtkSingleSelection reports a brief empty selection between those | ||
| * operations. Empty selection does not close the current chat, so it must | ||
| * not erase the node identity used to recognize the same row when it comes | ||
| * back. | ||
| */ | ||
| if (node == NULL || node == self->selected) | ||
| return; | ||
|
Comment on lines
+1729
to
1730
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When the user explicitly clears the current selection, which is supported because this model enables Useful? React with 👍 / 👎. |
||
|
|
||
| /* A real selection made while a remote is still connecting wins over what | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a daemon snapshot adds, removes, or reorders a folder before an inline new-chat row, inserting the placeholder into
targetat its pre-refresh absolute index does not keep the row alive. Reconciliation first moves the changed daemon row, shifting the placeholder, and then the generic loop removes and reinserts the placeholder to restore this target index; GTK consequently unbinds the active editor, which can commit it throughon_editor_focus_left()or discard its focus before the user submits or cancels. Preserve placeholders independently of daemon-row movement rather than assigning them an absolute target index.Useful? React with 👍 / 👎.