mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-18 13:40:55 -04:00
feat(sdk): Remove NotificationSettings::subscribe_to_changes.
This patch removes `NotificationSettings::subscribe_to_changes` because it's not used anywhere in our code except in tests. It is indeed part of the public API but I'm not aware of anyone using it for the moment. It only adds complexity in the code.
This commit is contained in:
@@ -582,8 +582,6 @@ async fn test_room_notification_count() -> Result<()> {
|
||||
// Now Alice is only interesting in mentions of their name.
|
||||
let settings = alice.notification_settings().await;
|
||||
|
||||
let mut settings_changes = settings.subscribe_to_changes();
|
||||
|
||||
tracing::warn!("Updating room notification mode to mentions and keywords only...");
|
||||
settings
|
||||
.set_room_notification_mode(
|
||||
@@ -594,7 +592,7 @@ async fn test_room_notification_count() -> Result<()> {
|
||||
tracing::warn!("Done!");
|
||||
|
||||
// Wait for remote echo.
|
||||
timeout(Duration::from_secs(3), settings_changes.recv())
|
||||
tokio::time::sleep(Duration::from_secs(3))
|
||||
.await
|
||||
.expect("timeout when waiting for settings update")
|
||||
.expect("should've received echo after updating settings");
|
||||
|
||||
Reference in New Issue
Block a user