add mouse flicks to the gif filmstrip
This commit is contained in:
@@ -1146,9 +1146,14 @@ pub(crate) fn extract_thumbnails(
|
||||
drop(std::fs::remove_file(extra));
|
||||
}
|
||||
}
|
||||
// Keep both sides of a page boundary available while scrolling.
|
||||
for entry in std::fs::read_dir(out_dir)?.flatten() {
|
||||
let path = entry.path();
|
||||
if path != page_dir && entry.file_type().is_ok_and(|kind| kind.is_dir()) {
|
||||
let name = entry.file_name();
|
||||
let nearby = name.to_str().and_then(|name| name.split_once('-'))
|
||||
.and_then(|(rate, offset)| Some((rate.parse::<u32>().ok()?, offset.parse::<u32>().ok()?)))
|
||||
.is_some_and(|(rate, offset)| rate == fps && offset.abs_diff(start) <= PAGE_SIZE as u32 * 2);
|
||||
if !nearby && entry.file_type().is_ok_and(|kind| kind.is_dir()) {
|
||||
drop(std::fs::remove_dir_all(path));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user