From fff7a34c53ad858adb8b953cf9cc9aa8d02657cd Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Wed, 24 Nov 2021 15:45:04 +0300 Subject: [PATCH] [DE] Fix Bug 54054 --- apps/common/mobile/lib/view/Search.jsx | 3 ++- apps/documenteditor/mobile/src/controller/Search.jsx | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/common/mobile/lib/view/Search.jsx b/apps/common/mobile/lib/view/Search.jsx index 3d9590dd8..586c97fea 100644 --- a/apps/common/mobile/lib/view/Search.jsx +++ b/apps/common/mobile/lib/view/Search.jsx @@ -302,5 +302,6 @@ class SearchView extends Component { } const SearchViewWithObserver = observer(SearchView); +const SearchSettingsViewWithObserver = observer(SearchSettingsView); -export {SearchViewWithObserver as SearchView, SearchSettingsView}; +export {SearchViewWithObserver as SearchView, SearchSettingsViewWithObserver as SearchSettingsView}; diff --git a/apps/documenteditor/mobile/src/controller/Search.jsx b/apps/documenteditor/mobile/src/controller/Search.jsx index a5a689e31..320d5bb85 100644 --- a/apps/documenteditor/mobile/src/controller/Search.jsx +++ b/apps/documenteditor/mobile/src/controller/Search.jsx @@ -25,6 +25,8 @@ class SearchSettings extends SearchSettingsView { const _t = t("Settings", {returnObjects: true}); const storeAppOptions = this.props.storeAppOptions; const isEdit = storeAppOptions.isEdit; + const storeReview = this.props.storeReview; + const displayMode = storeReview.displayMode; const markup = ( @@ -37,7 +39,7 @@ class SearchSettings extends SearchSettingsView { this.onFindReplaceClick('find')} /> - {isEdit ? [ + {isEdit && displayMode === 'markup' ? [ this.onFindReplaceClick('replace')} />, { return }); -const SearchSettingsWithTranslation = inject("storeAppOptions")(observer(withTranslation()(SearchSettings))); +const SearchSettingsWithTranslation = inject("storeAppOptions", "storeReview")(observer(withTranslation()(SearchSettings))); export {Search, SearchSettingsWithTranslation as SearchSettings}