fix: move wrapped storage to unwrapped if not encrypted (#1603)
This commit is contained in:
@@ -76,6 +76,11 @@ export class WebApplication extends SNApplication implements WebApplicationInter
|
||||
|
||||
if (this.isNativeMobileWeb()) {
|
||||
this.mobileWebReceiver = new MobileWebReceiver(this)
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
console.log = (...args) => {
|
||||
this.mobileDevice.consoleLog(...args)
|
||||
}
|
||||
}
|
||||
|
||||
this.onVisibilityChange = () => {
|
||||
@@ -228,7 +233,7 @@ export class WebApplication extends SNApplication implements WebApplicationInter
|
||||
async handleMobileGainingFocusEvent(): Promise<void> {}
|
||||
|
||||
async handleMobileLosingFocusEvent(): Promise<void> {
|
||||
if (await this.getMobileScreenshotPrivacyEnabled()) {
|
||||
if (this.getMobileScreenshotPrivacyEnabled()) {
|
||||
this.mobileDevice.stopHidingMobileInterfaceFromScreenshots()
|
||||
}
|
||||
|
||||
@@ -236,7 +241,7 @@ export class WebApplication extends SNApplication implements WebApplicationInter
|
||||
}
|
||||
|
||||
async handleMobileResumingFromBackgroundEvent(): Promise<void> {
|
||||
if (await this.getMobileScreenshotPrivacyEnabled()) {
|
||||
if (this.getMobileScreenshotPrivacyEnabled()) {
|
||||
this.mobileDevice.hideMobileInterfaceFromScreenshots()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ const BiometricsLock = ({ application }: Props) => {
|
||||
|
||||
useEffect(() => {
|
||||
const getHasBiometrics = async () => {
|
||||
const appHasBiometrics = await application.hasBiometrics()
|
||||
const appHasBiometrics = application.hasBiometrics()
|
||||
setHasBiometrics(appHasBiometrics)
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ const BiometricsLock = ({ application }: Props) => {
|
||||
await disableBiometrics()
|
||||
} else {
|
||||
setHasBiometrics(true)
|
||||
await application.enableBiometrics()
|
||||
application.enableBiometrics()
|
||||
await setBiometricsTimingValue(MobileUnlockTiming.OnQuit)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,22 +13,19 @@ type Props = {
|
||||
}
|
||||
|
||||
const MultitaskingPrivacy = ({ application }: Props) => {
|
||||
const [hasScreenshotPrivacy, setHasScreenshotPrivacy] = useState<boolean | undefined>(false)
|
||||
const [hasScreenshotPrivacy, setHasScreenshotPrivacy] = useState<boolean>(false)
|
||||
|
||||
useEffect(() => {
|
||||
const getHasScreenshotPrivacy = async () => {
|
||||
const hasScreenshotPrivacyEnabled = (await application.getMobileScreenshotPrivacyEnabled()) ?? true
|
||||
setHasScreenshotPrivacy(hasScreenshotPrivacyEnabled)
|
||||
}
|
||||
void getHasScreenshotPrivacy()
|
||||
const hasScreenshotPrivacyEnabled = application.getMobileScreenshotPrivacyEnabled()
|
||||
setHasScreenshotPrivacy(hasScreenshotPrivacyEnabled)
|
||||
}, [application])
|
||||
|
||||
const onScreenshotPrivacyPress = async () => {
|
||||
const enable = !hasScreenshotPrivacy
|
||||
setHasScreenshotPrivacy(enable)
|
||||
|
||||
await application.setMobileScreenshotPrivacyEnabled(enable)
|
||||
await (application.deviceInterface as MobileDeviceInterface).setAndroidScreenshotPrivacy(enable)
|
||||
application.setMobileScreenshotPrivacyEnabled(enable)
|
||||
;(application.deviceInterface as MobileDeviceInterface).setAndroidScreenshotPrivacy(enable)
|
||||
}
|
||||
|
||||
const screenshotPrivacyFeatureText = isIOS() ? 'Multitasking Privacy' : 'Multitasking/Screenshot Privacy'
|
||||
|
||||
Reference in New Issue
Block a user