[fractal/fractal-next] session: Remove session.show-room action
- From: Julian Sparber <jsparber src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal/fractal-next] session: Remove session.show-room action
- Date: Wed, 5 May 2021 09:29:50 +0000 (UTC)
commit 194125f795cffeef5d217a1a451cf6e93ac78900
Author: Kévin Commaille <zecakeh tedomum fr>
Date: Tue May 4 17:10:55 2021 +0200
session: Remove session.show-room action
src/session/mod.rs | 23 +----------------------
1 file changed, 1 insertion(+), 22 deletions(-)
---
diff --git a/src/session/mod.rs b/src/session/mod.rs
index 2eae75a0..8f674e85 100644
--- a/src/session/mod.rs
+++ b/src/session/mod.rs
@@ -19,7 +19,7 @@ use gtk::subclass::prelude::*;
use gtk::{self, prelude::*};
use gtk::{glib, glib::clone, glib::SyncSender, CompositeTemplate};
use gtk_macros::send;
-use log::{error, warn};
+use log::error;
use matrix_sdk::api::r0::{
filter::{FilterDefinition, LazyLoadOptions, RoomEventFilter, RoomFilter},
session::login,
@@ -67,21 +67,6 @@ mod imp {
fn class_init(klass: &mut Self::Class) {
Self::bind_template(klass);
- klass.install_action(
- "session.show-room",
- Some("s"),
- move |widget, _, parameter| {
- use std::convert::TryInto;
- if let Some(room_id) = parameter
- .and_then(|p| p.str())
- .and_then(|s| s.try_into().ok())
- {
- widget.handle_show_room_action(room_id);
- } else {
- warn!("Not a valid room id: {:?}", parameter);
- }
- },
- );
}
fn instance_init(obj: &InitializingObject<Self>) {
@@ -377,12 +362,6 @@ impl Session {
secret::store_session(homeserver, session)
}
- fn handle_show_room_action(&self, room_id: RoomId) {
- let priv_ = imp::Session::from_instance(self);
- let room = priv_.rooms.borrow().get(&room_id).cloned();
- self.set_selected_room(room);
- }
-
fn handle_sync_response(&self, response: SyncResponse) {
let priv_ = imp::Session::from_instance(self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]