diff --git a/apps/sigchat/locales/i18n.json b/apps/sigchat/locales/i18n.json index cf87e40ab..9fd8a69cb 100644 --- a/apps/sigchat/locales/i18n.json +++ b/apps/sigchat/locales/i18n.json @@ -15,6 +15,10 @@ "en": "Please scan with primary Signal device", "en-tts": "Please scan with primary Signal device" }, + "sigchat.account.offline": { + "en": "Read Signal offline", + "en-tts": "Read Signal offline" + }, "sigchat.account.register": { "en": "Register a new Signal Account", "en-tts": "Register a new Signal Account" diff --git a/apps/sigchat/src/lib.rs b/apps/sigchat/src/lib.rs index 0a29b9e80..e71ef27e1 100644 --- a/apps/sigchat/src/lib.rs +++ b/apps/sigchat/src/lib.rs @@ -70,7 +70,8 @@ impl<'a> SigChat<'a> { Ok(false) } - /// Setup a Signal Account via Registration or Linking + /// Setup a Signal Account via Registration or Linking, + /// or abort setup and read existing chat Dialogues in pddb /// fn account_setup(&mut self) -> Result { log::info!("Attempting to setup a Signal Account"); @@ -80,6 +81,9 @@ impl<'a> SigChat<'a> { self.modals .add_list_item(t!("sigchat.account.register", locales::LANG)) .expect("failed add list item"); + self.modals + .add_list_item(t!("sigchat.account.offline", locales::LANG)) + .expect("failed add list item"); self.modals .get_radiobutton(t!("sigchat.account.title", locales::LANG)) .expect("failed radiobutton modal"); @@ -87,7 +91,10 @@ impl<'a> SigChat<'a> { Ok(index) => match index { 0 => Ok(self.account_link()?), 1 => Ok(self.account_register()?), - + 2 => { + log::info!("account setup aborted"); + Err(Error::new(ErrorKind::Other, "account setup aborted")) + } _ => { log::warn!("invalid index"); Err(Error::new(ErrorKind::Other, "invalid radio index"))