mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-19 22:50:13 +08:00
28 lines
756 B
HTML
28 lines
756 B
HTML
---
|
|
layout: docs
|
|
title: DraftChangeSet
|
|
---
|
|
|
|
<h2>Summary</h2>
|
|
|
|
<div class="markdown-from-sourecode">
|
|
<p><p>As the user interacts with the draft, changes are accumulated in the
|
|
DraftChangeSet associated with the store proxy. The DraftChangeSet does two things:</p>
|
|
<ol>
|
|
<li>It debounces changes and calls Actions.saveDraft() at a reasonable interval.</li>
|
|
<li>It exposes <code>applyToModel</code>, which allows you to optimistically apply changes
|
|
to a draft object. When the proxy vends the draft, it passes it through this
|
|
function to apply uncommitted changes. This means the Draft provided by the
|
|
DraftStoreProxy will always relfect recent changes, even though they're
|
|
written to the database intermittently.</li>
|
|
</ol>
|
|
</p>
|
|
</div>
|
|
|
|
<ul>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|