mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat: locked view mobile (#18316)
* feat: locked/private view * feat: locked/private view * feat: mobile lock/private view * feat: mobile lock/private view * merge main * pr feedback * pr feedback * bottom sheet sizing * always lock when navigating away
This commit is contained in:
parent
397808dd1a
commit
fe71894308
57 changed files with 1893 additions and 289 deletions
38
mobile/lib/models/auth/biometric_status.model.dart
Normal file
38
mobile/lib/models/auth/biometric_status.model.dart
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
import 'package:collection/collection.dart';
|
||||
import 'package:local_auth/local_auth.dart';
|
||||
|
||||
class BiometricStatus {
|
||||
final List<BiometricType> availableBiometrics;
|
||||
final bool canAuthenticate;
|
||||
|
||||
const BiometricStatus({
|
||||
required this.availableBiometrics,
|
||||
required this.canAuthenticate,
|
||||
});
|
||||
|
||||
@override
|
||||
String toString() =>
|
||||
'BiometricStatus(availableBiometrics: $availableBiometrics, canAuthenticate: $canAuthenticate)';
|
||||
|
||||
BiometricStatus copyWith({
|
||||
List<BiometricType>? availableBiometrics,
|
||||
bool? canAuthenticate,
|
||||
}) {
|
||||
return BiometricStatus(
|
||||
availableBiometrics: availableBiometrics ?? this.availableBiometrics,
|
||||
canAuthenticate: canAuthenticate ?? this.canAuthenticate,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(covariant BiometricStatus other) {
|
||||
if (identical(this, other)) return true;
|
||||
final listEquals = const DeepCollectionEquality().equals;
|
||||
|
||||
return listEquals(other.availableBiometrics, availableBiometrics) &&
|
||||
other.canAuthenticate == canAuthenticate;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => availableBiometrics.hashCode ^ canAuthenticate.hashCode;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue