1
0
mirror of https://github.com/flarum/core.git synced 2025-10-12 15:34:26 +02:00

New and improved post stream.

This commit is contained in:
Toby Zerner
2015-05-29 18:17:50 +09:30
parent 2741923714
commit cafa6c7b5d
15 changed files with 609 additions and 899 deletions

View File

@@ -10,7 +10,7 @@ export default function(app) {
Discussion.prototype.replyAction = function(goToLast, forceRefresh) {
if (app.session.user() && this.canReply()) {
if (goToLast && app.current.discussion && app.current.discussion().id() === this.id()) {
app.current.streamContent.goToLast();
app.current.stream.goToLast();
}
var component = app.composer.component;
if (!(component instanceof ReplyComposer) || component.props.discussion !== this || component.props.user !== app.session.user() || forceRefresh) {
@@ -47,7 +47,7 @@ export default function(app) {
if (title && title !== currentTitle) {
this.save({title}).then(discussion => {
if (app.current instanceof DiscussionPage) {
app.current.stream().sync();
app.current.stream.sync();
}
m.redraw();
});