mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 11:48:26 -06:00
DEV: Remove use of run-loop-dot-access (#17114)
Context: https://deprecations.emberjs.com/v3.x/#toc_deprecated-run-loop-and-computed-dot-access
This commit is contained in:
parent
1f85eea64c
commit
6ad5db80de
@ -6,7 +6,7 @@ import { bufferedProperty } from "discourse/mixins/buffered-content";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import { propertyNotEqual } from "discourse/lib/computed";
|
||||
import { equal, reads } from "@ember/object/computed";
|
||||
import { run } from "@ember/runloop";
|
||||
import { next } from "@ember/runloop";
|
||||
import { action } from "@ember/object";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
|
||||
@ -33,7 +33,7 @@ export default Controller.extend(bufferedProperty("model"), {
|
||||
// this is needed because the model doesnt have default values
|
||||
// and as we are using a bufferedProperty it's not accessible
|
||||
// in any other way
|
||||
run.next(() => {
|
||||
next(() => {
|
||||
if (this.model) {
|
||||
if (!this.model.badge_type_id) {
|
||||
this.model.set(
|
||||
|
@ -2,7 +2,7 @@ import { A } from "@ember/array";
|
||||
import Helper from "@ember/component/helper";
|
||||
import { computed, get } from "@ember/object";
|
||||
import { getOwner } from "@ember/application";
|
||||
import { run } from "@ember/runloop";
|
||||
import { join } from "@ember/runloop";
|
||||
import { assert, runInDebug } from "@ember/debug";
|
||||
|
||||
function getCurrentRouteInfos(router) {
|
||||
@ -40,7 +40,7 @@ export function routeAction(actionName, router, ...params) {
|
||||
return function (...invocationArgs) {
|
||||
let { action, handler } = getRouteWithAction(router, actionName);
|
||||
let args = params.concat(invocationArgs);
|
||||
return run.join(handler, action, ...args);
|
||||
return join(handler, action, ...args);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { isLegacyEmber } from "discourse-common/config/environment";
|
||||
import { run } from "@ember/runloop";
|
||||
import { begin, end } from "@ember/runloop";
|
||||
import tippy from "tippy.js";
|
||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
||||
|
||||
@ -41,8 +41,8 @@ export function showPopover(event, options = {}) {
|
||||
|
||||
// hangs on legacy ember
|
||||
if (!isLegacyEmber) {
|
||||
run.begin();
|
||||
instance.popper.addEventListener("transitionend", run.end, {
|
||||
begin();
|
||||
instance.popper.addEventListener("transitionend", end, {
|
||||
once: true,
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user