1
0
Fork 0

Merge branch 'master' into rich-comp

Dieser Commit ist enthalten in:
Angus McLeod 2020-10-02 07:42:38 +10:00
Commit 8a0dc999b3
3 geänderte Dateien mit 27 neuen und 24 gelöschten Zeilen

Datei anzeigen

@ -3,6 +3,7 @@ import { default as wizardSchema } from '../lib/wizard-schema';
import { set, get } from "@ember/object"; import { set, get } from "@ember/object";
import Mixin from "@ember/object/mixin"; import Mixin from "@ember/object/mixin";
import { observes } from 'discourse-common/utils/decorators'; import { observes } from 'discourse-common/utils/decorators';
import { deepEqual } from 'discourse-common/lib/object';
export default Mixin.create({ export default Mixin.create({
didInsertElement() { didInsertElement() {
@ -90,7 +91,7 @@ export default Mixin.create({
toggleUndo() { toggleUndo() {
const current = this.get(this.componentType); const current = this.get(this.componentType);
const original = this.originalObject; const original = this.originalObject;
this.set('showUndo', !_.isEqual(current, original)); this.set('showUndo', !deepEqual(current, original));
}, },
actions: { actions: {

Datei anzeigen

@ -80,6 +80,7 @@
//= require discourse/app/helpers/category-link //= require discourse/app/helpers/category-link
//= require discourse/app/helpers/user-avatar //= require discourse/app/helpers/user-avatar
//= require discourse/app/helpers/format-username //= require discourse/app/helpers/format-username
//= require discourse/app/helpers/share-url
//= require discourse-common/addon/helpers/component-for-collection //= require discourse-common/addon/helpers/component-for-collection
//= require discourse-common/addon/helpers/component-for-row //= require discourse-common/addon/helpers/component-for-row
//= require discourse-common/addon/lib/raw-templates //= require discourse-common/addon/lib/raw-templates

Datei anzeigen

@ -1,5 +1,6 @@
import { CANCELLED_STATUS } from 'discourse/lib/autocomplete'; import { CANCELLED_STATUS } from 'discourse/lib/autocomplete';
import getUrl from 'discourse-common/lib/get-url'; import getUrl from 'discourse-common/lib/get-url';
import discourseDebounce from "discourse/lib/debounce";
var cache = {}, var cache = {},
cacheTopicId, cacheTopicId,
@ -39,7 +40,7 @@ function performSearch(term, topicId, includeGroups, includeMentionableGroups, i
}); });
} }
var debouncedSearch = _.debounce(performSearch, 300); var debouncedSearch = discourseDebounce(performSearch, 300);
function organizeResults(r, options) { function organizeResults(r, options) {
if (r === CANCELLED_STATUS) { return r; } if (r === CANCELLED_STATUS) { return r; }