This commit is contained in:
Floris Bruynooghe
2021-02-11 22:51:06 +01:00
parent 6fddcd83c1
commit 148ad31024
4 changed files with 4 additions and 13 deletions

View File

@@ -385,7 +385,7 @@ impl Chatlist {
ret.text2 = None;
} else if lastmsg.is_none() || lastmsg.as_ref().unwrap().from_id == DC_CONTACT_ID_UNDEFINED
{
ret.text2 = Some(stock_str::no_messages(context).await.to_string());
ret.text2 = Some(stock_str::no_messages(context).await);
} else {
ret.fill(&mut lastmsg.unwrap(), chat, lastcontact.as_ref(), context)
.await;

View File

@@ -1289,7 +1289,7 @@ async fn create_or_lookup_group(
// After all, the sender has a reference/in-reply-to that
// points to this chat.
let s = stock_str::unknown_sender_for_chat(context).await;
mime_parser.repl_msg_by_error(s.to_string());
mime_parser.repl_msg_by_error(s);
}
// check if the group does not exist but should be created
@@ -2633,11 +2633,7 @@ mod tests {
assert_eq!(
last_msg.text,
Some(
stock_str::failed_sending_to(&t, "assidhfaaspocwaeofi@gmail.com")
.await
.to_string(),
)
Some(stock_str::failed_sending_to(&t, "assidhfaaspocwaeofi@gmail.com").await,)
);
assert_eq!(last_msg.from_id, DC_CONTACT_ID_INFO);
}

View File

@@ -195,11 +195,7 @@ impl ChatId {
}
self.inner_set_ephemeral_timer(context, timer).await?;
let mut msg = Message::new(Viewtype::Text);
msg.text = Some(
stock_ephemeral_timer_changed(context, timer, DC_CONTACT_ID_SELF)
.await
.to_string(),
);
msg.text = Some(stock_ephemeral_timer_changed(context, timer, DC_CONTACT_ID_SELF).await);
msg.param.set_cmd(SystemMessage::EphemeralTimerChanged);
if let Err(err) = send_msg(context, self, &mut msg).await {
error!(

View File

@@ -895,7 +895,6 @@ impl Context {
ProtectionStatus::Unprotected => protection_enabled(self, from_id).await,
ProtectionStatus::Protected => protection_disabled(self, from_id).await,
}
.to_string()
}
pub(crate) async fn update_device_chats(&self) -> Result<(), Error> {