aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/account/view.go17
1 files changed, 13 insertions, 4 deletions
diff --git a/commands/account/view.go b/commands/account/view.go
index 9fa531b7..58450044 100644
--- a/commands/account/view.go
+++ b/commands/account/view.go
@@ -13,7 +13,8 @@ import (
)
type ViewMessage struct {
- Peek bool `opt:"-p"`
+ Peek bool `opt:"-p"`
+ Background bool `opt:"-b"`
}
func init() {
@@ -49,8 +50,12 @@ func (v ViewMessage) Execute(args []string) error {
app.PushError(msg.Error.Error())
return nil
}
- lib.NewMessageStoreView(msg, !v.Peek && acct.UiConfig().AutoMarkRead,
- store, app.CryptoProvider(), app.DecryptKeys,
+ lib.NewMessageStoreView(
+ msg,
+ !v.Peek && acct.UiConfig().AutoMarkRead,
+ store,
+ app.CryptoProvider(),
+ app.DecryptKeys,
func(view lib.MessageView, err error) {
if err != nil {
app.PushError(err.Error())
@@ -68,7 +73,11 @@ func (v ViewMessage) Execute(args []string) error {
acct.PushError(err)
return
}
- app.NewTab(viewer, buf.String())
+ if v.Background {
+ app.NewBackgroundTab(viewer, buf.String())
+ } else {
+ app.NewTab(viewer, buf.String())
+ }
})
return nil
}