Skip to content

Commit

Permalink
Full search pagination (#116)
Browse files Browse the repository at this point in the history
* update pagination scroll position

* update version

* update version

* update version
  • Loading branch information
darrell-roberts authored Jan 6, 2025
1 parent 78b5d2a commit 285d36b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.0.1</string>
<string>0.1.6</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.games</string>
<key>LSMinimumSystemVersion</key>
Expand Down
3 changes: 3 additions & 0 deletions assets/io.github.darrellroberts.hacker-news.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

<categories>
<category>News</category>
<category>Network</category>
<category>Internet</category>
</categories>

<developer id="io.github.darrellroberts">
Expand All @@ -31,6 +33,7 @@
>io.github.darrellroberts.hacker-news.desktop</launchable>

<releases>
<release version="0.1.6" type="stable" date="2025-01-06" />
<release version="0.1.5" type="stable" date="2025-01-05" />
<release version="0.1.4" type="stable" date="2025-01-03" />
<release version="0.1.3" type="stable" date="2025-01-02" />
Expand Down
2 changes: 1 addition & 1 deletion hacker-news-iced/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hacker-news-iced"
version = "0.1.5"
version = "0.1.6"
license.workspace = true
edition.workspace = true
description = "Hacker News Desktop Reader"
Expand Down
12 changes: 10 additions & 2 deletions hacker-news-iced/src/full_search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl FullSearchState {
widget::container(widget::Column::with_children(comment_rows).spacing(15))
.padding(padding::top(0).bottom(10).left(10).right(25)),
)
.id(widget::scrollable::Id::new("full_search")),
.id(full_search_scroll_id()),
)
.spacing(5);

Expand Down Expand Up @@ -260,8 +260,12 @@ impl FullSearchState {
.map(AppMsg::FullSearch)
}
},
None => todo!(),
None => Task::none(),
}
.chain(widget::scrollable::scroll_to(
full_search_scroll_id(),
Default::default(),
))
}
}

Expand All @@ -286,3 +290,7 @@ impl PaginatingView<AppMsg> for FullSearchState {
self.page
}
}

fn full_search_scroll_id() -> widget::scrollable::Id {
widget::scrollable::Id::new("full_search")
}

0 comments on commit 285d36b

Please sign in to comment.