fix: fixed gif images not working

This commit is contained in:
Byson94
2025-10-02 18:05:21 +05:30
parent 9072ff8525
commit 7936e4f881

View File

@@ -1117,8 +1117,12 @@ pub(super) fn build_image(
if let Some(delay) = iter.delay_time() {
glib::timeout_add_local(delay, move || {
let frame_pixbuf = iter.pixbuf();
widget_clone.set_pixbuf(Some(&frame_pixbuf));
let now = std::time::SystemTime::now();
if iter.advance(now) {
let frame_pixbuf = iter.pixbuf();
widget_clone.set_pixbuf(Some(&frame_pixbuf));
}
glib::ControlFlow::Continue
});