|
@@ -7,7 +7,9 @@ import 'package:flutter_typeahead/flutter_typeahead.dart';
|
|
import 'package:fluttercontactpicker/fluttercontactpicker.dart';
|
|
import 'package:fluttercontactpicker/fluttercontactpicker.dart';
|
|
import 'package:logging/logging.dart';
|
|
import 'package:logging/logging.dart';
|
|
import 'package:photos/core/configuration.dart';
|
|
import 'package:photos/core/configuration.dart';
|
|
|
|
+import 'package:photos/core/event_bus.dart';
|
|
import 'package:photos/db/public_keys_db.dart';
|
|
import 'package:photos/db/public_keys_db.dart';
|
|
|
|
+import 'package:photos/events/backup_folders_updated_event.dart';
|
|
import 'package:photos/models/collection.dart';
|
|
import 'package:photos/models/collection.dart';
|
|
import 'package:photos/models/public_key.dart';
|
|
import 'package:photos/models/public_key.dart';
|
|
import 'package:photos/services/collections_service.dart';
|
|
import 'package:photos/services/collections_service.dart';
|
|
@@ -140,6 +142,20 @@ class _SharingDialogState extends State<SharingDialog> {
|
|
if (choice != DialogUserChoice.firstChoice) {
|
|
if (choice != DialogUserChoice.firstChoice) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ // Add local folder in backup patch before creating
|
|
|
|
+ // sharable link
|
|
|
|
+ if (widget.collection.type == CollectionType.folder) {
|
|
|
|
+ final path = CollectionsService.instance
|
|
|
|
+ .decryptCollectionPath(widget.collection);
|
|
|
|
+ if (!Configuration.instance
|
|
|
|
+ .getPathsToBackUp()
|
|
|
|
+ .contains(path)) {
|
|
|
|
+ await Configuration.instance
|
|
|
|
+ .addPathToFoldersToBeBackedUp(path);
|
|
|
|
+ Bus.instance.fire(BackupFoldersUpdatedEvent());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
final dialog = createProgressDialog(
|
|
final dialog = createProgressDialog(
|
|
context,
|
|
context,
|