Skip to content

Commit 1e505a6

Browse files
Removed limit of shown Starred files
+ Removed overlooked filtering, sorting and limiting of Starred items to max of 50. It now lists all starred items it can parse.
1 parent d522417 commit 1e505a6

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/tab.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,10 +1359,8 @@ pub fn is_starred(path: PathBuf) -> bool {
13591359
}
13601360

13611361
pub fn scan_starred(sizes: IconSizes) -> Vec<Item> {
1362-
let mut starred: Vec<_> = user_starred().into_iter().filter_map(|bookmark| {
1362+
let starred: Vec<_> = user_starred().into_iter().filter_map(|bookmark| {
13631363
let path = uri_to_path(bookmark.href)?;
1364-
let last_edit = bookmark.modified.parse::<jiff::Timestamp>().ok()?;
1365-
let last_visit = bookmark.visited.parse::<jiff::Timestamp>().ok()?;
13661364
if path.exists() {
13671365
let file_name = path.file_name()?;
13681366
let name = file_name.to_string_lossy().to_string();
@@ -1378,15 +1376,14 @@ pub fn scan_starred(sizes: IconSizes) -> Vec<Item> {
13781376
}
13791377
};
13801378
let item = item_from_entry(path, name, metadata, sizes);
1381-
Some((item, last_edit.min(last_visit)))
1379+
Some(item)
13821380
} else {
13831381
log::warn!("starred file path does not exist: {}", path.display());
13841382
None
13851383
}
13861384
})
13871385
.collect();
1388-
starred.sort_by_key(|bookmark| Reverse(bookmark.1));
1389-
starred.into_iter().take(50).map(|(item, _)| item).collect()
1386+
starred.into_iter().collect()
13901387
}
13911388

13921389
pub fn scan_network(uri: &str, sizes: IconSizes) -> Vec<Item> {

0 commit comments

Comments
 (0)