aboutsummaryrefslogtreecommitdiffstats
path: root/commands/compose/postpone.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/compose/postpone.go')
-rw-r--r--commands/compose/postpone.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/commands/compose/postpone.go b/commands/compose/postpone.go
index 9cb337bc..fd59cc11 100644
--- a/commands/compose/postpone.go
+++ b/commands/compose/postpone.go
@@ -4,7 +4,6 @@ import (
"bytes"
"time"
- "github.com/miolini/datacounter"
"github.com/pkg/errors"
"git.sr.ht/~sircmpwn/getopt"
@@ -116,20 +115,19 @@ func (p Postpone) Execute(aerc *widgets.Aerc, args []string) error {
}
aerc.RemoveTab(composer, false)
- var buf bytes.Buffer
- ctr := datacounter.NewWriterCounter(&buf)
- err = composer.WriteMessage(header, ctr)
+ buf := &bytes.Buffer{}
+
+ err = composer.WriteMessage(header, buf)
if err != nil {
handleErr(errors.Wrap(err, "WriteMessage"))
return
}
- nbytes := int(ctr.Count())
worker.PostAction(&types.AppendMessage{
Destination: targetFolder,
Flags: models.SeenFlag,
Date: time.Now(),
- Reader: &buf,
- Length: int(nbytes),
+ Reader: buf,
+ Length: buf.Len(),
}, func(msg types.WorkerMessage) {
switch msg := msg.(type) {
case *types.Done: