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()
|
||||
}
|
||||
}, ApplicationEvent.LocalDataLoaded),
|
||||
|
||||
application.addEventObserver(async () => {
|
||||
this.disableMoments()
|
||||
this.pauseMoments()
|
||||
}, ApplicationEvent.BiometricsSoftLockEngaged),
|
||||
|
||||
application.addEventObserver(async () => {
|
||||
this.enableMoments()
|
||||
this.resumeMoments()
|
||||
}, ApplicationEvent.BiometricsSoftLockDisengaged),
|
||||
)
|
||||
|
||||
@@ -67,6 +69,18 @@ export class MomentsService extends AbstractViewController {
|
||||
clearInterval(this.intervalReference)
|
||||
}
|
||||
|
||||
private pauseMoments(): void {
|
||||
clearInterval(this.intervalReference)
|
||||
}
|
||||
|
||||
private resumeMoments(): void {
|
||||
if (!this.isEnabled) {
|
||||
return
|
||||
}
|
||||
|
||||
void this.beginTakingPhotos()
|
||||
}
|
||||
|
||||
private beginTakingPhotos() {
|
||||
if (this.intervalReference) {
|
||||
clearInterval(this.intervalReference)
|
||||
|
||||
Reference in New Issue
Block a user