mirror of
https://gitlab.com/schmiddi-on-mobile/flare.git
synced 2026-10-29 15:07:47 -04:00
Merge branch 'fix-first-message' into 'master'
fix(manager): Fix channel not emitted on first message See merge request schmiddi-on-mobile/flare!254
This commit is contained in:
commit
eb9b385e7a
2 files changed
+8
No files matched your search
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Fixed
|
||||
|
||||
- Don't panic when setting up the database failed.
|
||||
- Channels were not listed in the channel list after their first message was received, until Flare was restarted.
|
||||
|
||||
## [0.22.6] - 2026-10-15
|
||||
|
||||
|
||||
@@ -297,10 +297,17 @@ impl Manager {
|
||||
message.set_pending(pending);
|
||||
|
||||
let channel = message.channel();
|
||||
|
||||
channel
|
||||
.new_message(message)
|
||||
.await
|
||||
.expect("Failed to add message to the channel");
|
||||
|
||||
// Emit channels if this is the first message (channels that already had messages were already emitted when initialized or earlier on their first message).
|
||||
let first_message_in_timeline = channel.timeline().n_items() == 1;
|
||||
if first_message_in_timeline {
|
||||
self.emit_by_name::<()>("channel", &[&channel]);
|
||||
}
|
||||
} else if let Some(msg) = message.as_amendment_message() {
|
||||
log::trace!("Message is an amendment message");
|
||||
// TODO: Error?
|
||||
|
||||
Reference in new issue
Block a user