fix: hide subscription marketing on iOS (#1929)

This commit is contained in:
Mo
2022-11-02 12:07:26 -05:00
committed by GitHub
parent f3e2d80b44
commit 35b21b21ce
13 changed files with 100 additions and 42 deletions

View File

@@ -110,6 +110,7 @@ const ContentListView: FunctionComponent<Props> = ({
renderedItems,
items,
searchBarElement,
isCurrentNoteTemplate,
} = itemListController
const { selectedUuids, selectNextItem, selectPreviousItem } = selectionController
@@ -245,13 +246,13 @@ const ContentListView: FunctionComponent<Props> = ({
)
useEffect(() => {
const hasEditorPane = selectedUuids.size > 0
const hasEditorPane = selectedUuids.size > 0 || renderedItems.length === 0 || isCurrentNoteTemplate
if (!hasEditorPane) {
itemsViewPanelRef.current?.style.removeProperty('width')
}
}, [selectedUuids, itemsViewPanelRef])
}, [selectedUuids, itemsViewPanelRef, isCurrentNoteTemplate, renderedItems])
const hasEditorPane = selectedUuids.size > 0 || renderedItems.length === 0
const hasEditorPane = selectedUuids.size > 0 || renderedItems.length === 0 || isCurrentNoteTemplate
return (
<div

View File

@@ -212,14 +212,17 @@ const DisplayOptionsMenu: FunctionComponent<DisplayOptionsMenuProps> = ({
{!DailyEntryModeEnabled &&
'Create powerful workflows and organizational layouts with per-tag display preferences.'}
</p>
<Button
primary
small
className="col-start-1 col-end-3 mt-3 justify-self-start uppercase"
onClick={() => application.openPurchaseFlow()}
>
Upgrade Features
</Button>
{!application.hideSubscriptionMarketing && (
<Button
primary
small
className="col-start-1 col-end-3 mt-3 justify-self-start uppercase"
onClick={() => application.openPurchaseFlow()}
>
Upgrade Features
</Button>
)}
</div>
)