fix: show files option in linking menu even if not entitled

This commit is contained in:
Mo
2022-11-13 15:10:57 -06:00
parent 2b76d48392
commit f42657fa9e
10 changed files with 216 additions and 183 deletions

View File

@@ -39,6 +39,7 @@ import { AndroidBackHandler } from '@/NativeMobileWeb/AndroidBackHandler'
import { PrefDefaults } from '@/Constants/PrefDefaults'
import { setCustomViewportHeight } from '@/setViewportHeightWithFallback'
import { WebServices } from './WebServices'
import { FeatureName } from '@/Controllers/FeatureName'
export type WebEventObserver = (event: WebAppEvent, data?: unknown) => void
@@ -347,6 +348,14 @@ export class WebApplication extends SNApplication implements WebApplicationInter
return this.hasValidSubscription()
}
get entitledToFiles(): boolean {
return this.getViewControllerManager().featuresController.entitledToFiles
}
showPremiumModal(featureName: FeatureName): void {
void this.getViewControllerManager().featuresController.showPremiumAlert(featureName)
}
hasValidSubscription(): boolean {
return this.getViewControllerManager().subscriptionController.hasValidSubscription()
}