about summary refs log tree commit diff stats
path: root/widgets/msglist.go
Commit message (Collapse)AuthorAgeFilesLines
* Fix jumping around in searchDrew DeVault2019-06-261-10/+5
|
* Implement :search, :next-result, :prev-resultDrew DeVault2019-06-261-0/+1
|
* Fix automatic scrolling when messages arrive/leaveDrew DeVault2019-06-111-2/+2
|
* Move select functionality from msglist to msgstoreKevin Kuehler2019-06-111-43/+20
| | | | | | Remove msglist Next and Prev commands Signed-off-by: Kevin Kuehler <kkuehler@brave.com>
* msglist: use distinct style for unread emailsYash Srivastav2019-06-081-0/+15
|
* Truncate long subject linesDrew DeVault2019-06-071-1/+5
|
* Message list: implement index-format optionYash Srivastav2019-06-071-1/+6
|
* Advance cursor after :delete and :moveDrew DeVault2019-05-191-4/+5
| | | | So that you can repeat the action on the next message if appropriate
* Reset message list cursor when switching storesDrew DeVault2019-05-191-1/+1
|
* Advance message list cursor when messages arriveDrew DeVault2019-05-191-0/+13
|
* Update internal state and draw from the same goroutineSimon Ser2019-05-191-21/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* s/aerc2/aerc/gDrew DeVault2019-05-171-4/+4
|
* Remove unimplemented color configurationDrew DeVault2019-05-171-2/+2
| | | | Will probably end up doing this differently anyway
* Implement ui.empty-message config optionDrew DeVault2019-05-171-1/+1
| | | | | Also removes some options that aren't going to be supported any time soon.
* Handle external message deletionsDrew DeVault2019-05-131-1/+0
|
* Handle incoming emails gracefullyDrew DeVault2019-05-131-0/+1
|
* lib/msgstore: protect with a mutexSimon Ser2019-04-291-0/+18
| | | | | | MessageStore has a lot of exported fields that can be read from the outside. Each read must be protected, because a call from Update could happen at any time.
* widgets/msglist: fix MessageList.store raceSimon Ser2019-04-291-23/+32
| | | | | This field could be written to in the middle of a Draw call, which reads it multiple times. Use an atomic variable instead.
* lib/ui: introduce InvalidatableSimon Ser2019-04-271-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix segfault on :view-message for unloaded messageTom Lebreux2019-04-101-0/+4
| | | | | | This also fixes segfault on :view-message on empty directory Signed-off-by: Tom Lebreux <tomlebreux@cock.li>
* Fix infinite loop on empty DirectoryContentsTom Lebreux2019-04-051-2/+4
| | | | | | | | | When changing to an empty directory, ml.selected is 0, and the length of ml.store.Uids is 0. The loop condition is always true so we have an infinite loop causing 100% CPU usage and prevents us to change to other directories. Signed-off-by: Tom Lebreux <tomlebreux@cock.li>
* Show (no messages) for empty foldersDrew DeVault2019-04-041-0/+6
|
* Use tcell.Style.Reverse instead of black on whiteDrew DeVault2019-03-301-2/+1
|
* Show deleted emails pending server ack in greyDrew DeVault2019-03-301-0/+3
| | | | TODO: Don't let the user select or interact with deleted messages
* Add body fetching support codeDrew DeVault2019-03-291-1/+1
|
* Improve cursor handling in embedded terminalDrew DeVault2019-03-211-0/+3
|
* Implement :delete-messageDrew DeVault2019-03-201-0/+20
|
* Fix scrolling issues on :select-messageDrew DeVault2019-03-171-0/+7
|
* Implement :select-messageDrew DeVault2019-03-151-0/+9
|
* Implement scrolling in message listDrew DeVault2019-03-151-3/+14
|
* Implement :next-message n%Drew DeVault2019-03-151-0/+6
|
* Move MessageStore into its own fileDrew DeVault2019-03-151-83/+3
|
* Rig up key bindingsDrew DeVault2019-03-151-2/+2
|
* Implement :{next,prev}-messageDrew DeVault2019-03-141-0/+20
|
* Invalidate when UIDs finish downloadingDrew DeVault2019-03-141-4/+0
|
* Display message subjects in message listDrew DeVault2019-03-141-3/+22
|
* Implement message store side of message fetchingDrew DeVault2019-03-141-10/+52
|
* Lay out message list widget basic designDrew DeVault2019-03-141-0/+89
|
* Fetch valid UIDs from server after opening dirDrew DeVault2019-03-101-0/+36