diff options
author | Robin Jarry <robin@jarry.cc> | 2024-02-28 23:55:20 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-03-04 22:30:14 +0100 |
commit | 2453375721832304b512380e6610de2c3d765bd5 (patch) | |
tree | 25960ef9ebb75ecb9c8b53fab4d2eea958c9e57f /commands/commands.go | |
parent | 963633eb83dc19089236ac78ba9d823e7e2a6df9 (diff) | |
download | aerc-2453375721832304b512380e6610de2c3d765bd5.tar.gz |
commands: rename confusing constants
There is an overlap between ACCOUNT and MESSAGE. Rename ACCOUNT to
MESSAGE_LIST and use MESSAGE_LIST|MESSAGE_VIEWER instead of MESSAGE.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Tim Culverhouse <tim@timculverhouse.com>
Diffstat (limited to 'commands/commands.go')
-rw-r--r-- | commands/commands.go | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/commands/commands.go b/commands/commands.go index 71976d05..27e50bcf 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -26,13 +26,11 @@ const ( // available everywhere GLOBAL // only when a message list is focused - ACCOUNT - // only when a message composer is focused - COMPOSE - // only when a message list or message viewer is focused - MESSAGE + MESSAGE_LIST // only when a message viewer is focused MESSAGE_VIEWER + // only when a message composer is focused + COMPOSE // only when a terminal TERMINAL ) @@ -42,11 +40,11 @@ func CurrentContext() CommandContext { switch app.SelectedTabContent().(type) { case *app.AccountView: - context |= ACCOUNT | MESSAGE + context |= MESSAGE_LIST case *app.Composer: context |= COMPOSE case *app.MessageViewer: - context |= MESSAGE | MESSAGE_VIEWER + context |= MESSAGE_VIEWER case *app.Terminal: context |= TERMINAL } |