Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/zbugs-rune/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -538,11 +538,10 @@ impl App {
if self.selected.as_ref() == Some(&id) {
return;
}
self.detail = None;
self.detail_result = ResultType::Unknown;
// The last issue and its comments stay until this one's rows come,
// a frame later from the local store, rather than "Loading…" between.
self.picker = None;
self.editing_comment = None;
self.comments.clear();
self.comments_limit = COMMENTS_PAGE;
self.comment = TextEdit::new("");
self.watch_detail(&id);
Expand Down Expand Up @@ -687,6 +686,7 @@ impl App {
};
let id = issue.id.clone();
tx.scroll_into_view(id.clone());
tx.color_motion(rune::Spring::NONE);
self.select(id);
// Near the end of what's loaded: the next page.
if let Some(i) = to {
Expand Down
9 changes: 8 additions & 1 deletion apps/zbugs-rune/src/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,11 @@ fn issue_row(s: &App, issue: &Issue, k: &Kit) -> El {
.w_full()
.px(12.0)
.py(9.0)
.on_press(move |s: &mut App| s.select(id.clone()))
.on_press_tx(move |s: &mut App, tx| {
// The highlight moves at once, with the issue beside it.
tx.color_motion(rune::Spring::NONE);
s.select(id.clone());
})
.child(text_col.w_full());
if selected {
r = r.fill(k.c.layer_02);
Expand Down Expand Up @@ -795,8 +799,11 @@ fn detail(s: &App, k: &Kit, layer: &mut Vec<El>) -> El {
.build(k)
.key("search"),
);
// Another issue lands at once, as in zbugs-swift and zbugs-gpui: without
// this, Rune fades the last issue's text out while the new one fades in.
let frame = col()
.key("detail")
.instant_changes()
.grow(1.0)
.h_full()
.min_w(0.0)
Expand Down
Loading