aboutsummaryrefslogtreecommitdiff
path: root/widgets/account.go
AgeCommit message (Collapse)Author
2019-07-08Factor UI models out of the worker message packageBen Burwell
Before, the information needed to display different parts of the UI was tightly coupled to the specific messages being sent back and forth to the backend worker. Separating out a models package allows us to be more specific about exactly what a backend is able to and required to provide for the UI.
2019-07-05Make :pipe command more genericDrew DeVault
2019-06-14Set empty message in dirlist if no folder exist.Reto Brunner
2019-06-14imap: respect the folder config optionReto Brunner
2019-06-09Add archive commandRobert Günzler
Adds an archive command that moves the current message into the folder specified in the account config entry. Supports three layouts at this point: - flat: puts all messages next to each other - year: creates a folder per year - month: same as above, plus folders per month This also adds a "-p" argument to "cp" and "mv" that works like "--parents" on mkdir(1). We use this to auto-create the directories for the archive layout.
2019-06-07Add binding to toggle headersDrew DeVault
2019-06-07Skip rendering dirlist if sidebar width is 0Lucas F. Souza
2019-06-02widget: Add ProvidesMessage interfaceKevin Kuehler
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>
2019-06-02Only add message to store if store existsKevin Kuehler
Prevents the program from panicing when changing folders too quickly. onMessage can race store creation for an AccountView. Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
2019-05-20Load IMAP worker for imap+insecureDrew DeVault
2019-05-20Verify TLS certificatesDrew DeVault
I was partway done implementing a UI for users to approve untrusted certs with, but let's just make them configure their servers right instead.
2019-05-19Update internal state and draw from the same goroutineSimon Ser
This commit introduces a new Aerc.Tick function that should be called to refresh the internal state. This in turn makes each AccountView process worker events. The UI goroutine repeatedly refreshes the internal state before drawing a new frame. The reason for this is that many worker messages may need to be processed for a single frame, and drawing the UI is far slower than refreshing the internal state. This has been confirmed in my testing (calling Aerc.Tick only once per frame results in a slower display). Many synchronization code has been removed. We can now write widgets without having to care so much about races. The remaining sync users are: - widgets/spinner: the spinner value is updated from inside an internal goroutine - lib/ui/invalidatable: Invalidate may be called from any goroutine - lib/ui/grid: same - lib/ui/ui: an internal goroutine needs read access to UI.exit - worker/types/worker: Worker.callbacks is used for both worker and UI callbacks The exact goroutine requirements for Drawable have been documented.
2019-05-17s/aerc2/aerc/gDrew DeVault
2019-05-17Remove unimplemented color configurationDrew DeVault
Will probably end up doing this differently anyway
2019-05-16Implement (basic form) of :replyDrew DeVault
2019-05-14Implement :copy (aka :cp)Drew DeVault
2019-05-13Handle incoming emails gracefullyDrew DeVault
2019-05-13Populate "From" header from config for new emailsDrew DeVault
2019-04-27lib/ui: introduce InvalidatableSimon Ser
Many Drawable implementations have their own Invalidate and OnInvalidate functions, with an unexported onInvalidate field. However OnInvalidate and Invalidate are usually not called in the same goroutine. This results in a race on this field, e.g.: Read at 0x00c000094748 by goroutine 7: git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList.func1() /home/simon/src/aerc2/widgets/dirlist.go:85 +0x56 git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start.func1() /home/simon/src/aerc2/widgets/spinner.go:93 +0x1bb Previous write at 0x00c000094748 by main goroutine: [failed to restore the stack] Goroutine 7 (running) created at: git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start() /home/simon/src/aerc2/widgets/spinner.go:46 +0x8f git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList() /home/simon/src/aerc2/widgets/dirlist.go:37 +0x286 git.sr.ht/~sircmpwn/aerc2/widgets.NewAccountView() /home/simon/src/aerc2/widgets/account.go:50 +0x5ca git.sr.ht/~sircmpwn/aerc2/widgets.NewAerc() /home/simon/src/aerc2/widgets/aerc.go:60 +0x800 main.main() /home/simon/src/aerc2/aerc.go:65 +0x33e To fix this, introduce a new type, Invalidatable, which protects the field. Unfortunately the Drawable must be passed to the callback function in Invalidate, so we still need to re-implement this in each Invalidatable user.
2019-03-31Make message viewer real, part twoDrew DeVault
2019-03-30Correct color of error messagesDrew DeVault
2019-03-29Add body fetching support codeDrew DeVault
2019-03-20Implement :delete-messageDrew DeVault
2019-03-17Move exline handling up to aerc, add :termDrew DeVault
2019-03-17Add basic terminal widgetDrew DeVault
2019-03-15Move MessageStore into its own fileDrew DeVault
2019-03-15Implement default in accounts.confDrew DeVault
2019-03-15Implement sidebar-width config optionDrew DeVault
2019-03-15Rig up key bindingsDrew DeVault
2019-03-14Implement :{next,prev}-messageDrew DeVault
2019-03-14Use cached message store when re-opening dirsDrew DeVault
2019-03-14Implement :cd commandDrew DeVault
2019-03-14Implement message store side of message fetchingDrew DeVault
2019-03-14Lay out message list widget basic designDrew DeVault
2019-03-10Fetch valid UIDs from server after opening dirDrew DeVault
2019-03-10Improve error reportingDrew DeVault
2019-03-10Flesh out command parsing & handlingDrew DeVault
2019-03-10Start building out command subsystemDrew DeVault
2019-02-10Fix buildElias Naur
2019-01-20Implement Container interface in widgets/Drew DeVault
2019-01-14Send commands up to the top-level aerc widgetDrew DeVault
2019-01-13Handle errors from worker initializationDrew DeVault
2019-01-13Swap message list placeholder for spinnerDrew DeVault
2019-01-13Handle connection errors properlyDrew DeVault
2019-01-13Simplify approach to directory listDrew DeVault
This doesn't really need to be abstract tbh
2019-01-13Filter dirlist according to user configDrew DeVault
2019-01-13Add directory list widgetDrew DeVault
2019-01-13Move ex line into accountDrew DeVault
2019-01-13Move status line into account, update behaviorDrew DeVault
2019-01-13Initialize worker in account widgetDrew DeVault