chore: Upgrade crate dependencies

This commit is contained in:
Kévin Commaille 2023-12-10 11:06:04 +01:00
parent 1bfeb7a5cb
commit 51f03cd850
No known key found for this signature in database
GPG key ID: 29A48C1F03620416
5 changed files with 566 additions and 407 deletions

876
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -75,7 +75,7 @@ sourceview = { package = "sourceview5", version = "0.7" }
[dependencies.matrix-sdk]
git = "https://github.com/matrix-org/matrix-rust-sdk.git"
rev = "8895ce40d13faa79012144c97044990284215758"
rev = "5ab69f74004a2a8ed4fdd0669d8e8547c95d3377"
features = [
"socks",
"sso-login",
@ -86,12 +86,12 @@ features = [
[dependencies.matrix-sdk-ui]
git = "https://github.com/matrix-org/matrix-rust-sdk.git"
rev = "8895ce40d13faa79012144c97044990284215758"
rev = "5ab69f74004a2a8ed4fdd0669d8e8547c95d3377"
default-features = false
features = ["e2e-encryption", "native-tls"]
[dependencies.ruma]
version = "0.9.2"
version = "0.9.4"
# git = "https://github.com/ruma/ruma.git"
# rev = "4ef6d1641bdd7d1c1586d2356c183798f3900bf1"
features = [

View file

@ -260,6 +260,7 @@ impl CameraPaintable {
}
fn create_sender(&self) -> glib::Sender<Action> {
#[allow(deprecated)]
let (sender, receiver) = glib::MainContext::channel(glib::Priority::DEFAULT);
receiver.attach(

View file

@ -8,13 +8,13 @@ use futures_util::StreamExt;
use gtk::{gio, glib, glib::clone, prelude::*, subclass::prelude::*};
use matrix_sdk::Error as MatrixError;
use matrix_sdk_ui::timeline::{
BackPaginationStatus, PaginationOptions, RoomExt, Timeline as SdkTimeline,
TimelineItem as SdkTimelineItem,
default_event_filter, BackPaginationStatus, PaginationOptions, RoomExt,
Timeline as SdkTimeline, TimelineItem as SdkTimelineItem,
};
use ruma::{
events::{
room::message::{MessageType, Relation},
AnySyncMessageLikeEvent, AnySyncStateEvent, AnySyncTimelineEvent, SyncMessageLikeEvent,
room::message::MessageType, AnySyncMessageLikeEvent, AnySyncStateEvent,
AnySyncTimelineEvent, SyncMessageLikeEvent,
},
OwnedEventId,
};
@ -528,48 +528,49 @@ impl Timeline {
Arc::new(
matrix_room
.timeline_builder()
.event_filter(|any| match any {
AnySyncTimelineEvent::MessageLike(msg) => match msg {
AnySyncMessageLikeEvent::RoomMessage(
SyncMessageLikeEvent::Original(ev),
) => {
if ev
.content
.relates_to
.as_ref()
.is_some_and(|rel| matches!(rel, Relation::Replacement(_)))
{
return false;
}
.event_filter(|any, room_version| {
// Make sure we don't try to show events that can't be shown.
if !default_event_filter(any, room_version) {
return false;
}
matches!(
ev.content.msgtype,
MessageType::Audio(_)
| MessageType::Emote(_)
| MessageType::File(_)
| MessageType::Image(_)
| MessageType::Location(_)
| MessageType::Notice(_)
| MessageType::ServerNotice(_)
| MessageType::Text(_)
| MessageType::Video(_)
| MessageType::VerificationRequest(_)
// Only show events we want.
match any {
AnySyncTimelineEvent::MessageLike(msg) => match msg {
AnySyncMessageLikeEvent::RoomMessage(
SyncMessageLikeEvent::Original(ev),
) => {
matches!(
ev.content.msgtype,
MessageType::Audio(_)
| MessageType::Emote(_)
| MessageType::File(_)
| MessageType::Image(_)
| MessageType::Location(_)
| MessageType::Notice(_)
| MessageType::ServerNotice(_)
| MessageType::Text(_)
| MessageType::Video(_)
| MessageType::VerificationRequest(_)
)
}
AnySyncMessageLikeEvent::Sticker(
SyncMessageLikeEvent::Original(_),
)
}
AnySyncMessageLikeEvent::Sticker(SyncMessageLikeEvent::Original(_))
| AnySyncMessageLikeEvent::RoomEncrypted(
SyncMessageLikeEvent::Original(_),
) => true,
_ => false,
},
AnySyncTimelineEvent::State(state) => matches!(
state,
AnySyncStateEvent::RoomMember(_)
| AnySyncStateEvent::RoomCreate(_)
| AnySyncStateEvent::RoomEncryption(_)
| AnySyncStateEvent::RoomThirdPartyInvite(_)
| AnySyncStateEvent::RoomTombstone(_)
),
| AnySyncMessageLikeEvent::RoomEncrypted(
SyncMessageLikeEvent::Original(_),
) => true,
_ => false,
},
AnySyncTimelineEvent::State(state) => matches!(
state,
AnySyncStateEvent::RoomMember(_)
| AnySyncStateEvent::RoomCreate(_)
| AnySyncStateEvent::RoomEncryption(_)
| AnySyncStateEvent::RoomThirdPartyInvite(_)
| AnySyncStateEvent::RoomTombstone(_)
),
}
})
.add_failed_to_parse(false)
.build()

View file

@ -254,6 +254,7 @@ mod imp {
self.parent_constructed();
let obj = self.obj();
#[allow(deprecated)]
let (main_sender, main_receiver) =
glib::MainContext::sync_channel::<MainMessage>(Default::default(), 100);