[fractal/split-async-state-ui-appop-mgmt: 11/18] Avoid cloning in appop::invite methods
- From: Alejandro Domínguez <aledomu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal/split-async-state-ui-appop-mgmt: 11/18] Avoid cloning in appop::invite methods
- Date: Mon, 14 Dec 2020 21:14:22 +0000 (UTC)
commit 46e0a59c319b228b8b5f01707223638bd6ab2401
Author: Alejandro Domínguez <adomu net-c com>
Date: Thu Dec 3 17:47:21 2020 +0100
Avoid cloning in appop::invite methods
fractal-gtk/src/appop/room_settings.rs | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/fractal-gtk/src/appop/room_settings.rs b/fractal-gtk/src/appop/room_settings.rs
index 2f0f476c..6532a8ac 100644
--- a/fractal-gtk/src/appop/room_settings.rs
+++ b/fractal-gtk/src/appop/room_settings.rs
@@ -45,26 +45,25 @@ impl AppOp {
}
pub fn show_new_room_avatar(&self) -> Option<()> {
- let panel = self.ui.room_settings.clone()?;
- panel.show_new_room_avatar();
+ self.ui.room_settings.as_ref()?.show_new_room_avatar();
None
}
pub fn show_new_room_name(&self) -> Option<()> {
- let panel = self.ui.room_settings.clone()?;
- panel.show_new_room_name();
+ self.ui.room_settings.as_ref()?.show_new_room_name();
None
}
pub fn show_new_room_topic(&self) -> Option<()> {
- let panel = self.ui.room_settings.clone()?;
- panel.show_new_room_topic();
+ self.ui.room_settings.as_ref()?.show_new_room_topic();
None
}
pub fn set_notifications_switch(&self, active: bool, sensitive: bool) -> Option<()> {
- let panel = self.ui.room_settings.clone()?;
- panel.set_notifications_switch(active, sensitive);
+ self.ui
+ .room_settings
+ .as_ref()?
+ .set_notifications_switch(active, sensitive);
None
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]