aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2024-08-07 20:52:37 +0200
committerRobin Jarry <robin@jarry.cc>2024-08-20 12:26:47 +0200
commit11f57b5f3378f944ea54a8a9de4ca040c62f5b12 (patch)
treee00d3ff6732351d4abbe56d856fe96c1138067bc /app
parent054b5edc002008f20210f79e384381560a4f753d (diff)
downloadaerc-11f57b5f3378f944ea54a8a9de4ca040c62f5b12.tar.gz
commands: add reload
Add the reload command that performs a reload of config files. The reload command supports reloading the binds.conf and aerc.conf config files. Reloading will reload account views (including the directory list), message viewers, and composers. Signed-off-by: Koni Marti <koni.marti@gmail.com> Tested-by: Inwit <inwit@sindominio.net> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'app')
-rw-r--r--app/account.go7
-rw-r--r--app/app.go1
-rw-r--r--app/compose.go4
3 files changed, 8 insertions, 4 deletions
diff --git a/app/account.go b/app/account.go
index 45321755..7a2cf582 100644
--- a/app/account.go
+++ b/app/account.go
@@ -194,6 +194,13 @@ func (acct *AccountView) Directories() DirectoryLister {
return acct.dirlist
}
+func (acct *AccountView) SetDirectories(d DirectoryLister) {
+ if acct.grid != nil {
+ acct.grid.ReplaceChild(acct.dirlist, d)
+ }
+ acct.dirlist = d
+}
+
func (acct *AccountView) Labels() []string {
return acct.labels
}
diff --git a/app/app.go b/app/app.go
index ad38e720..37444c8b 100644
--- a/app/app.go
+++ b/app/app.go
@@ -51,6 +51,7 @@ func PinTab() { aerc.PinTab() }
func UnpinTab() { aerc.UnpinTab() }
func MoveTab(i int, relative bool) { aerc.MoveTab(i, relative) }
func TabNames() []string { return aerc.TabNames() }
+func GetTab(i int) *ui.Tab { return aerc.tabs.Get(i) }
func SelectTab(name string) bool { return aerc.SelectTab(name) }
func SelectPreviousTab() bool { return aerc.SelectPreviousTab() }
func SelectedTab() *ui.Tab { return aerc.SelectedTab() }
diff --git a/app/compose.go b/app/compose.go
index 0f4ada62..7a581505 100644
--- a/app/compose.go
+++ b/app/compose.go
@@ -137,10 +137,6 @@ func (c *Composer) Parent() *models.OriginalMail {
}
func (c *Composer) SwitchAccount(newAcct *AccountView) error {
- if c.acct == newAcct {
- log.Tracef("same accounts: no switch")
- return nil
- }
// sync the header with the editors
for _, editor := range c.editors {
editor.storeValue()