Mailspring/spec
Ben Gotow fe5b75b32a fix(counts): Switch to simpler SQL-based counters, introduce total counts
Summary:
The old approach we were using to track unread counts by category was really complicated because it involved computing changes to counts in javascript and then syncing them back to the database, from each process that was making queries. Rather than try to fix that, this diff moves us to a new approach where the counts are maintained by executing a query before and after threads are modified to unapply / reapply them from the counters. Doing this in the database in the same transactions as the thread modifications themselves ensures the counts are internally consistent with the Threads table.

This SQL approach is also able to compute initial counts way faster - initializing totals and unreads in a 1GB edgehill.db in about 1 second on my machine.

Test Plan: All old tests removed, new tests coming

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2757
2016-03-17 18:24:27 -07:00
..
components remove(popover): Remove Popover in favor of FixedPopover 2016-03-09 10:05:46 -08:00
extensions
fixtures es6(tasks): send, syncback and specs converted to ES6 2016-03-17 16:23:53 -07:00
models fix(specs) 2016-03-14 11:22:42 -07:00
services
stores fix(counts): Switch to simpler SQL-based counters, introduce total counts 2016-03-17 18:24:27 -07:00
tasks es6(tasks): send, syncback and specs converted to ES6 2016-03-17 16:23:53 -07:00
action-bridge-spec.coffee
auto-update-manager-spec.coffee
buffered-process-spec.coffee
clipboard-spec.coffee
component-registry-spec.coffee
database-object-registry-spec.coffee
date-utils-spec.es6 fix(date-utils): Add localization to date formats 2016-03-07 16:44:54 -08:00
dom-utils-spec.coffee
extension-registry-spec.coffee
jasmine-helper.coffee
jasmine-jquery.js
jasmine.js
launch-services-spec.coffee
list-selection-spec.coffee feat(outbox): Sending status now appears beside drafts 2016-02-04 14:14:24 -08:00
mail-rules-processor-spec.coffee
mailbox-perspective-spec.es6 fix(remove-from-view): Fix logic for delete/remove-from-view behavior: 2016-03-07 18:16:37 -08:00
menu-manager-spec.coffee
module-cache-spec.coffee
n1-spec-reporter.coffee 🎨: Smaller buttons, smaller toolbar, smaller text 2016-02-09 19:45:24 -08:00
nylas-api-spec.coffee fix(syncback): Bidirectional transforms, ready-to-send saved state 2016-03-16 19:27:12 -07:00
nylas-env-spec.coffee
nylas-protocol-handler-spec.coffee
nylas-test-utils.coffee
package-manager-spec.coffee
package-spec.coffee
quoted-html-transformer-spec.coffee feat(quote): add new quoted text detector for quote strings 2016-03-03 17:30:36 -08:00
quoted-plain-text-transformer-spec.coffee
spec-bootstrap.coffee bump(*): Electron 0.36.7, version to 0.4.6 2016-02-08 18:35:23 -08:00
spec-helper-platform.coffee
spec-helper.coffee fix(tracking): fix link tracking and read receipt plugins 2016-02-24 12:30:12 -08:00
spec-suite.coffee
spellchecker-spec.coffee
style-manager-spec.coffee
styles-element-spec.coffee
task-factory-spec.es6 fix(remove-from-view): Fix logic for delete/remove-from-view behavior: 2016-03-07 18:16:37 -08:00
theme-manager-spec.coffee
time-override.coffee
time-reporter.coffee
undo-manager-spec.coffee
utils-spec.coffee fix(trash/spam): New inAllMail filter applied to all mailbox views except trash and spam 2016-03-10 12:41:32 -08:00