From d4d9217c4a359ff3c78139b32cae4e026c364da4 Mon Sep 17 00:00:00 2001 From: Maximiliano Sandoval R Date: Mon, 10 Apr 2023 13:49:11 +0200 Subject: [PATCH] item_row: Stop spinners when idle --- src/session/content/room_history/item_row.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/session/content/room_history/item_row.rs b/src/session/content/room_history/item_row.rs index e5e3e99d..ea1f7425 100644 --- a/src/session/content/room_history/item_row.rs +++ b/src/session/content/room_history/item_row.rs @@ -4,7 +4,7 @@ use gtk::{gio, glib, glib::clone}; use matrix_sdk::room::timeline::TimelineItemContent; use crate::{ - components::{ContextMenuBin, ContextMenuBinExt, ContextMenuBinImpl, ReactionChooser}, + components::{ContextMenuBin, ContextMenuBinExt, ContextMenuBinImpl, ReactionChooser, Spinner}, session::{ content::room_history::{ message_row::MessageRow, DividerRow, RoomHistory, StateRow, TypingRow, @@ -295,18 +295,16 @@ impl ItemRow { PlaceholderKind::Spinner => { if self .child() - .filter(|widget| widget.is::()) + .filter(|widget| widget.is::()) .is_none() { self.set_popover(None); self.set_action_group(None); self.set_event_actions(None); - let spinner = gtk::Spinner::builder() - .spinning(true) - .margin_top(12) - .margin_bottom(12) - .build(); + let spinner = Spinner::default(); + spinner.set_margin_top(12); + spinner.set_margin_bottom(12); self.set_child(Some(&spinner)); } }