Add new 'jumpToPostId' plugin API method
This commit is contained in:
parent
f56a746d71
commit
3a58dc0858
|
@ -205,7 +205,7 @@ export default Ember.Controller.extend(BufferedContent, {
|
|||
});
|
||||
},
|
||||
|
||||
// Called the the topmost visible post on the page changes.
|
||||
// Called when the topmost visible post on the page changes.
|
||||
topVisibleChanged(event) {
|
||||
const { post, refresh } = event;
|
||||
if (!post) { return; }
|
||||
|
@ -477,6 +477,10 @@ export default Ember.Controller.extend(BufferedContent, {
|
|||
this._jumpToPostId(this.get('model.last_read_post_id'));
|
||||
},
|
||||
|
||||
jumpToPostId(postId) {
|
||||
this._jumpToPostId(postId);
|
||||
},
|
||||
|
||||
toggleMultiSelect() {
|
||||
this.toggleProperty('multiSelect');
|
||||
this.appEvents.trigger('post-stream:refresh', { force: true });
|
||||
|
|
|
@ -26,7 +26,7 @@ import { addGTMPageChangedCallback } from 'discourse/lib/page-tracker';
|
|||
import { registerCustomAvatarHelper } from 'discourse/helpers/user-avatar';
|
||||
|
||||
// If you add any methods to the API ensure you bump up this number
|
||||
const PLUGIN_API_VERSION = '0.8.18';
|
||||
const PLUGIN_API_VERSION = '0.8.19';
|
||||
|
||||
class PluginApi {
|
||||
constructor(version, container) {
|
||||
|
|
Loading…
Reference in New Issue