chore: fix per-tag preferences not working when using offline subscription code

This commit is contained in:
Aman Harwara
2023-10-18 23:54:34 +05:30
parent f07d439bb6
commit 1bd5b7880d
2 changed files with 5 additions and 1 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.hasFirstPartyOnlineOrOfflineSubscription()
const hasSubscription = application.subscriptionController.hasFirstPartySubscriptionOrOfflineRepo()
const controlsDisabled = currentMode === 'tag' && !hasSubscription
const isDailyEntry = selectedTagPreferences?.entryMode === 'daily'

View File

@@ -101,6 +101,10 @@ export class SubscriptionController extends AbstractViewController implements In
}
}
hasFirstPartySubscriptionOrOfflineRepo(): boolean {
return this.hasFirstPartyOnlineOrOfflineSubscription() || this.features.hasOfflineRepo()
}
get usedInvitationsCount(): number {
return (
this.subscriptionInvitations?.filter((invitation) =>