fix: Fixed issue where Moments could incorrectly get engaged during biometrics unlocking
This commit is contained in:
@@ -29,11 +29,13 @@ export class MomentsService extends AbstractViewController {
|
|||||||
void this.beginTakingPhotos()
|
void this.beginTakingPhotos()
|
||||||
}
|
}
|
||||||
}, ApplicationEvent.LocalDataLoaded),
|
}, ApplicationEvent.LocalDataLoaded),
|
||||||
|
|
||||||
application.addEventObserver(async () => {
|
application.addEventObserver(async () => {
|
||||||
this.disableMoments()
|
this.pauseMoments()
|
||||||
}, ApplicationEvent.BiometricsSoftLockEngaged),
|
}, ApplicationEvent.BiometricsSoftLockEngaged),
|
||||||
|
|
||||||
application.addEventObserver(async () => {
|
application.addEventObserver(async () => {
|
||||||
this.enableMoments()
|
this.resumeMoments()
|
||||||
}, ApplicationEvent.BiometricsSoftLockDisengaged),
|
}, ApplicationEvent.BiometricsSoftLockDisengaged),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -67,6 +69,18 @@ export class MomentsService extends AbstractViewController {
|
|||||||
clearInterval(this.intervalReference)
|
clearInterval(this.intervalReference)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private pauseMoments(): void {
|
||||||
|
clearInterval(this.intervalReference)
|
||||||
|
}
|
||||||
|
|
||||||
|
private resumeMoments(): void {
|
||||||
|
if (!this.isEnabled) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
void this.beginTakingPhotos()
|
||||||
|
}
|
||||||
|
|
||||||
private beginTakingPhotos() {
|
private beginTakingPhotos() {
|
||||||
if (this.intervalReference) {
|
if (this.intervalReference) {
|
||||||
clearInterval(this.intervalReference)
|
clearInterval(this.intervalReference)
|
||||||
|
|||||||
Reference in New Issue
Block a user