Commit 87da3090 authored by Michael Gratton's avatar Michael Gratton 🤞

Merge branch 'wip/248-no-compiser-from-without-aliases' into 'master'

Show From field in paned composer when other accounts exist

Closes #248

See merge request !126

(cherry picked from commit 288178b5)

064e926b Show From field in paned composer when other accounts exist
parent 026e6201
Pipeline #61197 failed with stages
in 42 minutes and 13 seconds
......@@ -2098,18 +2098,20 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
try {
accounts = Geary.Engine.instance.get_accounts();
} catch (Error e) {
debug("Could not fetch account info: %s", e.message);
warning("Could not fetch account info: %s", e.message);
return false;
}
// Don't show in inline, compact, or paned modes, unless the current
// account has multiple emails.
if ((this.state == ComposerState.INLINE || this.state == ComposerState.INLINE_COMPACT ||
this.state == ComposerState.PANED) && !this.account.information.has_sender_aliases)
// Don't show in inline unless the current account has
// multiple emails, since these will be replies to a
// conversation
if ((this.state == ComposerState.INLINE ||
this.state == ComposerState.INLINE_COMPACT) &&
!this.account.information.has_sender_aliases)
return false;
// If there's only one account, show nothing. (From fields are hidden above.)
// If there's only one account and it not have any aliases,
// show nothing.
if (accounts.size < 1 || (accounts.size == 1 && !Geary.traverse<Geary.AccountInformation>(
accounts.values).first().has_sender_aliases))
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment