From c61dbad3155c0840b7eb3bf5dc6d2368ebcea8d9 Mon Sep 17 00:00:00 2001 From: Jarda Snajdr Date: Tue, 13 Oct 2020 10:59:38 +0200 Subject: [PATCH] editor: remove two unused registry controls --- packages/editor/src/store/controls.js | 34 --------------------------- 1 file changed, 34 deletions(-) diff --git a/packages/editor/src/store/controls.js b/packages/editor/src/store/controls.js index c21fed5211062e..17583b3cf5b8c6 100644 --- a/packages/editor/src/store/controls.js +++ b/packages/editor/src/store/controls.js @@ -1,28 +1,3 @@ -/** - * WordPress dependencies - */ -import { createRegistryControl } from '@wordpress/data'; - -/** - * Returns a control descriptor signalling to subscribe to the registry and - * resolve the control promise only when the next state change occurs. - * - * @return {Object} Control descriptor. - */ -export function awaitNextStateChange() { - return { type: 'AWAIT_NEXT_STATE_CHANGE' }; -} - -/** - * Returns a control descriptor signalling to resolve with the current data - * registry. - * - * @return {Object} Control descriptor. - */ -export function getRegistry() { - return { type: 'GET_REGISTRY' }; -} - /** * Function returning a sessionStorage key to set or retrieve a given post's * automatic session backup. @@ -62,15 +37,6 @@ export function localAutosaveClear( postId, isPostNew ) { } const controls = { - AWAIT_NEXT_STATE_CHANGE: createRegistryControl( ( registry ) => () => - new Promise( ( resolve ) => { - const unsubscribe = registry.subscribe( () => { - unsubscribe(); - resolve(); - } ); - } ) - ), - GET_REGISTRY: createRegistryControl( ( registry ) => () => registry ), LOCAL_AUTOSAVE_SET( { postId, isPostNew, title, content, excerpt } ) { localAutosaveSet( postId, isPostNew, title, content, excerpt ); },