Changes proposed in this pull request:
Switches from a local variable on the DiscussionComposer to the official Flarum fields API on ComposerState.
This enables other extensions to read and modify the data, and most importantly for me this allows destroying and re-creating the Composer component without loosing the data which I need for another of my extensions.
Reviewers should focus on:
Any backward compatibility necessary? Probably not.
I don't know of any extension would touch this value.
Screenshot
No visual change
Confirmed
[x] Frontend changes: tested on a local Flarum installation.
[ ] Backend changes: tests are green (run composer test).
Changes proposed in this pull request: Switches from a local variable on the
DiscussionComposer
to the official Flarum fields API onComposerState
.This enables other extensions to read and modify the data, and most importantly for me this allows destroying and re-creating the Composer component without loosing the data which I need for another of my extensions.
Reviewers should focus on: Any backward compatibility necessary? Probably not.
I don't know of any extension would touch this value.
Screenshot No visual change
Confirmed
composer test
).