This causes an empty bookmarks list in the controlbox, because the
collection gets cleared (and then asynchronousy repopulated) while the
`bookmarksInitialized` promise stays `true` (resulting in a race
condition).
Alternative fix could be to clear the bookmarks and recreate the promise
before reconnecting but doesn't seem necessary to do all that work.
This required triggering the `converse-loaded` event in the entry.js
file, which means it won't be triggered for `@converse/headless` when
used in isolation.
Not ideal, but probably ok because consumers of `@converse/headless`
should probably import it into their own project in any case.
Had to make various other changes due to incompatibilities.
- Use the new `lit` package instead of `lit-html` or `lit-element`
- Drop `haunted` since it breaks the rules by specifying `type: module`
but then doesn't import with file extensions
- Use Sass Dart instead of node-sass (fixes#2445)
- Upgrade Karma
- Update to the latest @converse/skeletor (which uses mergebounce to batch writes)
- Flush storage before logging out
- Flush when reloading the tab
- Create initStorage method
when creating occupant from affiliation change stanza.
This means that when a presence for that occupant arrives, a duplicate
occupant is created (presumably because the original can't be find due
to the wrong nick being set).
- Move top-level functinos to utils files
- Get rid of unused/obsolete overrides
- Only import components there where they're used
- Bump version in package.json
Update storing of app settings. Store settings in a closured
`app_settings` object inside `@converse/headless/shared/settings`
Remove the `_converse.settings` object.