mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 07:23:22 +00:00
drafts: Separate initialize function into data and UI pieces.
This will let us initialize the data before the UI is ready to be initialized. We'll need to do this in an upcoming commit where we clear a flag on page load before the reload code initializes.
This commit is contained in:
@@ -622,6 +622,8 @@ export function initialize(): void {
|
||||
window.addEventListener("beforeunload", () => {
|
||||
update_draft();
|
||||
});
|
||||
|
||||
set_count(Object.keys(draft_model.get()).length);
|
||||
}
|
||||
|
||||
export function initialize_ui(): void {
|
||||
set_count(draft_model.getDraftCount());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user