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;
|
AutobackupQuotas? get autobackupQuotas => null;
|
||||||
|
|
||||||
|
String? get encryptionKey => null;
|
||||||
|
|
||||||
BackupsState copyWith({required final BackblazeBucket backblazeBucket});
|
BackupsState copyWith({required final BackblazeBucket backblazeBucket});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,6 +116,9 @@ class BackupsInitialized extends BackupsState {
|
||||||
@override
|
@override
|
||||||
AutobackupQuotas? get autobackupQuotas => _backupConfig?.autobackupQuotas;
|
AutobackupQuotas? get autobackupQuotas => _backupConfig?.autobackupQuotas;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String? get encryptionKey => _backupConfig?.encryptionKey;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Duration? get autobackupPeriod =>
|
Duration? get autobackupPeriod =>
|
||||||
_backupConfig?.autobackupPeriod?.inMinutes == 0
|
_backupConfig?.autobackupPeriod?.inMinutes == 0
|
||||||
|
|
|
@ -34,7 +34,7 @@ class _CopyEncryptionKeyModalState extends State<CopyEncryptionKeyModal> {
|
||||||
@override
|
@override
|
||||||
Widget build(final BuildContext context) {
|
Widget build(final BuildContext context) {
|
||||||
final String? encryptionKey =
|
final String? encryptionKey =
|
||||||
context.watch<BackupsBloc>().state.backblazeBucket?.encryptionKey;
|
context.watch<BackupsBloc>().state.encryptionKey;
|
||||||
if (encryptionKey == null) {
|
if (encryptionKey == null) {
|
||||||
return ListView(
|
return ListView(
|
||||||
controller: widget.scrollController,
|
controller: widget.scrollController,
|
||||||
|
|
Loading…
Reference in a new issue