mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-10 19:03:12 +00:00
fix(backups): Resolve backups encryption key on loading state
- Resolves #543
This commit is contained in:
parent
eb67c70fa0
commit
76821aeec5
|
@ -24,6 +24,8 @@ sealed class BackupsState extends Equatable {
|
|||
|
||||
AutobackupQuotas? get autobackupQuotas => null;
|
||||
|
||||
String? get encryptionKey => null;
|
||||
|
||||
BackupsState copyWith({required final BackblazeBucket backblazeBucket});
|
||||
}
|
||||
|
||||
|
@ -114,6 +116,9 @@ class BackupsInitialized extends BackupsState {
|
|||
@override
|
||||
AutobackupQuotas? get autobackupQuotas => _backupConfig?.autobackupQuotas;
|
||||
|
||||
@override
|
||||
String? get encryptionKey => _backupConfig?.encryptionKey;
|
||||
|
||||
@override
|
||||
Duration? get autobackupPeriod =>
|
||||
_backupConfig?.autobackupPeriod?.inMinutes == 0
|
||||
|
|
|
@ -34,7 +34,7 @@ class _CopyEncryptionKeyModalState extends State<CopyEncryptionKeyModal> {
|
|||
@override
|
||||
Widget build(final BuildContext context) {
|
||||
final String? encryptionKey =
|
||||
context.watch<BackupsBloc>().state.backblazeBucket?.encryptionKey;
|
||||
context.watch<BackupsBloc>().state.encryptionKey;
|
||||
if (encryptionKey == null) {
|
||||
return ListView(
|
||||
controller: widget.scrollController,
|
||||
|
|
Loading…
Reference in a new issue