refactor: display options menu logic

This commit is contained in:
Aman Harwara
2023-10-19 19:20:55 +05:30
parent c0358882c6
commit a62ffc6cf9
2 changed files with 4 additions and 13 deletions

View File

@@ -93,7 +93,7 @@ const DisplayOptionsMenu: FunctionComponent<DisplayOptionsMenuProps> = ({
: selectedTag.preferences
const [currentMode, setCurrentMode] = useState<PreferenceMode>(selectedTagPreferences ? 'tag' : 'global')
const [preferences, setPreferences] = useState<TagPreferences>({})
const hasSubscription = application.subscriptionController.hasFirstPartySubscriptionOrOfflineRepo()
const hasSubscription = application.subscriptionController.hasFirstPartyOnlineOrOfflineSubscription()
const controlsDisabled = currentMode === 'tag' && !hasSubscription
const isDailyEntry = selectedTagPreferences?.entryMode === 'daily'