cargo fmt
This commit is contained in:
@@ -10,10 +10,10 @@ pub mod interface {
|
||||
include!(concat!(env!("OUT_DIR"), "/kordophone-server.rs"));
|
||||
|
||||
pub mod signals {
|
||||
pub use crate::interface::NetBuzzertKordophoneRepositoryConversationsUpdated as ConversationsUpdated;
|
||||
pub use crate::interface::NetBuzzertKordophoneRepositoryMessagesUpdated as MessagesUpdated;
|
||||
pub use crate::interface::NetBuzzertKordophoneRepositoryAttachmentDownloadCompleted as AttachmentDownloadCompleted;
|
||||
pub use crate::interface::NetBuzzertKordophoneRepositoryAttachmentUploadCompleted as AttachmentUploadCompleted;
|
||||
pub use crate::interface::NetBuzzertKordophoneRepositoryConversationsUpdated as ConversationsUpdated;
|
||||
pub use crate::interface::NetBuzzertKordophoneRepositoryMessagesUpdated as MessagesUpdated;
|
||||
pub use crate::interface::NetBuzzertKordophoneRepositoryUpdateStreamReconnected as UpdateStreamReconnected;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,11 +128,11 @@ impl DbusRepository for ServerImpl {
|
||||
let mut map = arg::PropMap::new();
|
||||
map.insert("id".into(), arg::Variant(Box::new(msg.id)));
|
||||
|
||||
// xxx: Remove the attachment placeholder here.
|
||||
// xxx: Remove the attachment placeholder here.
|
||||
// This is not the ideal place to do this, but once we start using ChatItems instead of IMMessages
|
||||
// from the server, we shouldn't be seeing these placeholders.
|
||||
// from the server, we shouldn't be seeing these placeholders.
|
||||
let text = msg.text.replace("\u{FFFC}", "");
|
||||
|
||||
|
||||
map.insert("text".into(), arg::Variant(Box::new(text)));
|
||||
map.insert(
|
||||
"date".into(),
|
||||
@@ -272,12 +272,9 @@ impl DbusRepository for ServerImpl {
|
||||
self.send_event_sync(|r| Event::DownloadAttachment(attachment_id, preview, r))
|
||||
}
|
||||
|
||||
fn upload_attachment(
|
||||
&mut self,
|
||||
path: String,
|
||||
) -> Result<String, dbus::MethodErr> {
|
||||
fn upload_attachment(&mut self, path: String) -> Result<String, dbus::MethodErr> {
|
||||
use std::path::PathBuf;
|
||||
|
||||
|
||||
let path = PathBuf::from(path);
|
||||
self.send_event_sync(|r| Event::UploadAttachment(path, r))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user