aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-11-16 14:06:11 +0100
committerRobin Jarry <robin@jarry.cc>2023-12-05 01:06:57 +0100
commit2db657b6bdd6394109c8adc32098d3f39c43f03d (patch)
treecdbdaf685aaffe52eee598ca9e4760ba18687bc2 /app
parentc67723bcfbd5d181f2270bc25b691d6f6312a0c1 (diff)
downloadaerc-2db657b6bdd6394109c8adc32098d3f39c43f03d.tar.gz
aerc-2db657b6bdd6394109c8adc32098d3f39c43f03d.zip
cf: allow changing folder of another account
Add a new -a flag to :cf. When specified, an account name is required before the folder name and the focus will be changed to the corresponding account tab before changing folders. If the target folder does not exist, an explicit error will be reported. Changelog-added: Change to a folder of another account with `:cf -a <account> <folder>`. Signed-off-by: Robin Jarry <robin@jarry.cc> Co-authored-by: Johannes Thyssen Tishman <johannes@thyssentishman.com> Tested-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
Diffstat (limited to 'app')
-rw-r--r--app/account.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/account.go b/app/account.go
index 734ba37a..5b540523 100644
--- a/app/account.go
+++ b/app/account.go
@@ -128,6 +128,14 @@ func (acct *AccountView) UpdateStatus() {
}
}
+func (acct *AccountView) Select() {
+ for i, widget := range aerc.tabs.TabContent.Children() {
+ if widget == acct {
+ aerc.SelectTabIndex(i)
+ }
+ }
+}
+
func (acct *AccountView) PushStatus(status string, expiry time.Duration) {
PushStatus(fmt.Sprintf("%s: %s", acct.acct.Name, status), expiry)
}