function checkForRtaStartOnDraftAndReturnResult(oResult, oComponent) {
		// Dont check for RTA start in ushell scenario
		if (Utils.getUshellContainer()) {
			return Promise.resolve(oResult);
		}

		var sRestartingComponent = window.sessionStorage.getItem("sap.ui.rta.restart." + Layer.CUSTOMER);
		if (sRestartingComponent) {
			var sComponentId = Utils.getComponentClassName(oComponent);
			if (sRestartingComponent !== sComponentId && sRestartingComponent !== "true") {
				Log.error("an application component was started " +
					"which does not match the component for which the restart was triggered:\n" +
					"Triggering component: " + sRestartingComponent + "\n" +
					"Started component: " + sComponentId);

				return Promise.resolve(oResult);
			}

			window.sessionStorage.removeItem("sap.ui.rta.restart." + Layer.CUSTOMER);
			return new Promise(function (resolve) {
				sap.ui.getCore().loadLibrary("sap.ui.rta", {async: true})
				.then(function() {
					sap.ui.require(["sap/ui/rta/api/startKeyUserAdaptation"], function (startKeyUserAdaptation) {
						startKeyUserAdaptation({
							rootControl: oComponent
						});
						resolve(oResult);
					});
				});
			});
		}

		return Promise.resolve(oResult);
	}
/**
	 * The fl library must ensure a proper rta startup by a lazy loading of the rta library and starting RTA accordingly.
	 * This is needed in the stand alone scenario; ATTENTION: if also the ushell-plugin of rta runs, the first one will
	 * actually trigger the reload and clear the flag for the second.
	 *
	 * @param {object} oResult - The result which will be passed after the rta startup was checked and triggered if needed
	 * @param {object} oComponent - Application component about to be started
	 * @return {Promise} Promise resolving with the initially passed result
	 */
The fl library must ensure a proper rta startup by a lazy loading of the rta library and starting RTA accordingly.
This is needed in the stand alone scenario; ATTENTION: if also the ushell-plugin of rta runs, the first one will
actually trigger the reload and clear the flag for the second.

@param {object} oResult - The result which will be passed after the rta startup was checked and triggered if needed
@param {object} oComponent - Application component about to be started
@return {Promise} Promise resolving with the initially passed result
The fl library must ensure a proper rta startup by a lazy loading of the rta library and starting RTA accordingly . This is needed in the stand alone scenario ; ATTENTION : if also the ushell - plugin of rta runs the first one will actually trigger the reload and clear the flag for the second . @param { object } oResult - The result which will be passed after the rta startup was checked and triggered if needed @param { object } oComponent - Application component about to be started @return { Promise } Promise resolving with the initially passed result
function checkForRtaStartOnDraftAndReturnResult(oResult, oComponent) {
		if (Utils.getUshellContainer()) {
			return Promise.resolve(oResult);
		}
		var sRestartingComponent = window.sessionStorage.getItem("sap.ui.rta.restart." + Layer.CUSTOMER);
		if (sRestartingComponent) {
			var sComponentId = Utils.getComponentClassName(oComponent);
			if (sRestartingComponent !== sComponentId && sRestartingComponent !== "true") {
				Log.error("an application component was started " +
					"which does not match the component for which the restart was triggered:\n" +
					"Triggering component: " + sRestartingComponent + "\n" +
					"Started component: " + sComponentId);
				return Promise.resolve(oResult);
			}
			window.sessionStorage.removeItem("sap.ui.rta.restart." + Layer.CUSTOMER);
			return new Promise(function (resolve) {
				sap.ui.getCore().loadLibrary("sap.ui.rta", {async: true})
				.then(function() {
					sap.ui.require(["sap/ui/rta/api/startKeyUserAdaptation"], function (startKeyUserAdaptation) {
						startKeyUserAdaptation({
							rootControl: oComponent
						});
						resolve(oResult);
					});
				});
			});
		}
		return Promise.resolve(oResult);
	}
function checkForRtaStartOnDraftAndReturnResult ( oResult , oComponent ) { if ( Utils . getUshellContainer ( ) ) { return Promise . resolve ( oResult ) ; } var sRestartingComponent = window . sessionStorage . getItem ( "sap.ui.rta.restart." + Layer . CUSTOMER ) ; if ( sRestartingComponent ) { var sComponentId = Utils . getComponentClassName ( oComponent ) ; if ( sRestartingComponent !== sComponentId && sRestartingComponent !== "true" ) { Log . error ( "an application component was started " + "which does not match the component for which the restart was triggered:\n" + "Triggering component: " + sRestartingComponent + "\n" + "Started component: " + sComponentId ) ; return Promise . resolve ( oResult ) ; } window . sessionStorage . removeItem ( "sap.ui.rta.restart." + Layer . CUSTOMER ) ; return new Promise ( function ( resolve ) { sap . ui . getCore ( ) . loadLibrary ( "sap.ui.rta" , { async : true } ) . then ( function ( ) { sap . ui . require ( [ "sap/ui/rta/api/startKeyUserAdaptation" ] , function ( startKeyUserAdaptation ) { startKeyUserAdaptation ( { rootControl : oComponent } ) ; resolve ( oResult ) ; } ) ; } ) ; } ) ; } return Promise . resolve ( oResult ) ; }
The fl library must ensure a proper rta startup by a lazy loading of the rta library and starting RTA accordingly.
The fl library must ensure a proper rta startup by a lazy loading of the rta library and starting RTA accordingly .
// Dont check for RTA start in ushell scenario