mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Removed unused memberCount property passed to GhPublishmenu
refs https://github.com/TryGhost/Team/issues/1538 The memberCount property was not used, so I removed all related code and fetch.
This commit is contained in:
parent
1beadb5304
commit
04aff7f51b
3 changed files with 3 additions and 16 deletions
|
@ -295,10 +295,6 @@ export default Component.extend({
|
|||
return true;
|
||||
},
|
||||
|
||||
updateMemberCount(count) {
|
||||
this.memberCount = count;
|
||||
},
|
||||
|
||||
publishFromShortcut() {
|
||||
// trigger blur for inputs and textareas to trigger any actions
|
||||
// before attempting to save so we're saving after the result
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
@postStatus={{@data.post.status}}
|
||||
@saveTask={{@data.saveTask}}
|
||||
@setSaveType={{@data.setEditorSaveType}}
|
||||
@memberCount={{@data.memberCount}}
|
||||
@uiContext="preview" />
|
||||
{{/unless}}
|
||||
</header>
|
||||
|
|
|
@ -8,7 +8,7 @@ import classic from 'ember-classic-decorator';
|
|||
import config from 'ghost-admin/config/environment';
|
||||
import isNumber from 'ghost-admin/utils/isNumber';
|
||||
import moment from 'moment';
|
||||
import {action, computed, get} from '@ember/object';
|
||||
import {action, computed} from '@ember/object';
|
||||
import {alias, mapBy} from '@ember/object/computed';
|
||||
import {capitalize} from '@ember/string';
|
||||
import {dropTask, enqueueTask, restartableTask, task, taskGroup, timeout} from 'ember-concurrency';
|
||||
|
@ -277,8 +277,7 @@ export default class EditorController extends Controller {
|
|||
post: this.post,
|
||||
saveTask: this.saveTask,
|
||||
hasDirtyAttributes: this.hasDirtyAttributes,
|
||||
setEditorSaveType: this.setSaveType,
|
||||
memberCount: this.memberCount
|
||||
setEditorSaveType: this.setSaveType
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -774,13 +773,6 @@ export default class EditorController extends Controller {
|
|||
|
||||
// load supplementel data such as the members count in the background
|
||||
@restartableTask *backgroundLoaderTask() {
|
||||
try {
|
||||
let membersResponse = yield this.store.query('member', {limit: 1, filter: 'subscribed:true'});
|
||||
this.set('memberCount', get(membersResponse, 'meta.pagination.total'));
|
||||
} catch (error) {
|
||||
this.set('memberCount', 0);
|
||||
}
|
||||
|
||||
yield this.store.query('snippet', {limit: 'all'});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue