summary refs log tree commit diff stats
path: root/widgets/compose.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-05-15 19:41:21 -0400
committerDrew DeVault <sir@cmpwn.com>2019-05-15 19:41:21 -0400
commitb0bf09b98fc038c1bc9921d568c06260b7448a15 (patch)
treeacad72b3ec224d95c551a11ba35cf4e8522641e1 /widgets/compose.go
parent52b318127fe7ec001ca824947193b2cb7b0ebda6 (diff)
downloadaerc-b0bf09b98fc038c1bc9921d568c06260b7448a15.tar.gz
Copy sent emails to the Sent folder
Or rather, to a user-specified folder
Diffstat (limited to 'widgets/compose.go')
-rw-r--r--widgets/compose.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index 71b55e7..7f7afef 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -15,6 +15,7 @@ import (
 
 	"git.sr.ht/~sircmpwn/aerc2/config"
 	"git.sr.ht/~sircmpwn/aerc2/lib/ui"
+	"git.sr.ht/~sircmpwn/aerc2/worker/types"
 )
 
 type Composer struct {
@@ -30,6 +31,7 @@ type Composer struct {
 	email  *os.File
 	grid   *ui.Grid
 	review *reviewMessage
+	worker *types.Worker
 
 	focusable []ui.DrawableInteractive
 	focused   int
@@ -37,7 +39,8 @@ type Composer struct {
 
 // TODO: Let caller configure headers, initial body (for replies), etc
 func NewComposer(conf *config.AercConfig,
-	acct *config.AccountConfig) *Composer {
+	acct *config.AccountConfig, worker *types.Worker) *Composer {
+
 	grid := ui.NewGrid().Rows([]ui.GridSpec{
 		{ui.SIZE_EXACT, 3},
 		{ui.SIZE_WEIGHT, 1},
@@ -87,6 +90,7 @@ func NewComposer(conf *config.AercConfig,
 		editor: term,
 		email:  email,
 		grid:   grid,
+		worker: worker,
 		// You have to backtab to get to "From", since you usually don't edit it
 		focused:   1,
 		focusable: []ui.DrawableInteractive{from, to, subject, term},
@@ -155,6 +159,10 @@ func (c *Composer) Config() *config.AccountConfig {
 	return c.config
 }
 
+func (c *Composer) Worker() *types.Worker {
+	return c.worker
+}
+
 func (c *Composer) Header() (*mail.Header, []string, error) {
 	// Extract headers from the email, if present
 	c.email.Seek(0, os.SEEK_SET)
evious revision' href='/akspecs/aerc/blame/widgets/directories.go?h=0.2.1&id=c286d3da6ba8636412db5c3b72fda739a06e7f6c'>^
cf66462 ^
257affc ^
2349b7d ^




257affc ^
2349b7d ^
257affc ^

a782b70 ^
257affc ^
cf66462 ^


2349b7d ^



cf66462 ^
62946ff ^










cf66462 ^


62946ff ^



2349b7d ^
257affc ^
2349b7d ^


257affc ^


2349b7d ^


24196d2 ^
a782b70 ^





257affc ^




cf66462 ^
257affc ^





cf66462 ^






257affc ^

2349b7d ^
b60999c ^




































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156