Skip to content

Commit

Permalink
FIX: Allow discourse-presence to display 'editing' indicator (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaylorhq committed Sep 10, 2020
1 parent 74e8e61 commit 8311597
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions assets/javascripts/initializers/shared-edits-init.js.es6
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { withPluginApi } from "discourse/lib/plugin-api";
import { on, observes } from "discourse-common/utils/decorators";
import discourseComputed, {
on,
observes
} from "discourse-common/utils/decorators";
import {
setupSharedEdit,
teardownSharedEdit,
Expand Down Expand Up @@ -110,7 +113,12 @@ function initWithApi(api) {
});

api.modifyClass("model:composer", {
creatingSharedEdit: computed.equal("action", SHARED_EDIT_ACTION)
creatingSharedEdit: computed.equal("action", SHARED_EDIT_ACTION),

@discourseComputed("action")
editingPost() {
return this._super(...arguments) || this.creatingSharedEdit;
}
});

api.modifyClass("controller:topic", {
Expand Down

0 comments on commit 8311597

Please sign in to comment.