about summary refs log tree commit diff stats
path: root/widgets/account.go
diff options
context:
space:
mode:
authorKevin Kuehler <keur@ocf.berkeley.edu>2019-06-01 22:15:04 -0700
committerDrew DeVault <sir@cmpwn.com>2019-06-02 10:16:29 -0400
commit753adb90692e4821f8caea1d5d86cd69e312efa7 (patch)
tree79f7563e0ef68264b12244160b3274b678875624 /widgets/account.go
parent2be985fecb0d76e8fa7cdc46c8de92b6caab9552 (diff)
downloadaerc-753adb90692e4821f8caea1d5d86cd69e312efa7.tar.gz
widget: Add ProvidesMessage interface
Consists of 3 functions
* Store: Access to MessageStore type
* SelectedAccount: Access to Account widget that the target widget
belongs to
* SelectedMessage: Current message (selected in msglist or the one we
are viewing)

Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
Diffstat (limited to 'widgets/account.go')
-rw-r--r--widgets/account.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/widgets/account.go b/widgets/account.go
index f553a92..4526c02 100644
--- a/widgets/account.go
+++ b/widgets/account.go
@@ -157,6 +157,18 @@ func (acct *AccountView) Messages() *MessageList {
 	return acct.msglist
 }
 
+func (acct *AccountView) Store() *lib.MessageStore {
+	return acct.msglist.Store()
+}
+
+func (acct *AccountView) SelectedMessage() *types.MessageInfo {
+	return acct.msglist.Selected()
+}
+
+func (acct *AccountView) SelectedAccount() *AccountView {
+	return acct
+}
+
 func (acct *AccountView) onMessage(msg types.WorkerMessage) {
 	switch msg := msg.(type) {
 	case *types.Done:
log into module' href='/danisanti/profani-tty/commit/log.h?id=5eaf687d98de9683ea4e479845868c56c14f015d'>5eaf687d ^
0a57c4de ^
da03617e ^
44d16e91 ^

74a88ad5 ^







bf1cf044 ^




75cfe388 ^
2bbac1c8 ^

c3418a29 ^
55f49f12 ^
3b0f7e10 ^



dd11334b ^
c90c83f7 ^
5eaf687d ^
e8314106 ^



bf1cf044 ^
8944a3b5 ^
8c8c18c6 ^



8944a3b5 ^
f831f657 ^



8944a3b5 ^
bf1cf044 ^
8c5866ff ^

4e1ffa6b ^




dd11334b ^
5eaf687d ^
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