From 22973899b8d73520e934c449058156a09262ef3f Mon Sep 17 00:00:00 2001 From: Hocuri Date: Sat, 30 May 2020 11:58:45 +0200 Subject: [PATCH] Assume that thare always is Config::Addr set --- src/mimefactory.rs | 13 +++++-------- src/stock.rs | 3 --- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/mimefactory.rs b/src/mimefactory.rs index 632446d67..3727c1f70 100644 --- a/src/mimefactory.rs +++ b/src/mimefactory.rs @@ -377,14 +377,11 @@ impl<'a, 'b> MimeFactory<'a, 'b> { let self_name = match self.context.get_config(Config::Displayname).await { Some(name) => name, - None => match self.context.get_config(Config::Addr).await { - Some(name) => name, - None => self - .context - .stock_str(StockMessage::MessengerName) - .await - .to_string(), - }, + None => self + .context + .get_config(Config::Addr) + .await + .unwrap_or_default(), }; self.context diff --git a/src/stock.rs b/src/stock.rs index 54b8d23af..33dfd70ba 100644 --- a/src/stock.rs +++ b/src/stock.rs @@ -182,9 +182,6 @@ pub enum StockMessage { #[strum(props(fallback = "Message from %1$s"))] SubjectForNewContact = 73, - - #[strum(props(fallback = "Delta Chat"))] - MessengerName = 74, } /*