Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

feat: create and recreate stream buttons

Prateek Sunal5869bec7818d
diff --git a/mobile/apps/photos/lib/db/upload_locks_db.dart b/mobile/apps/photos/lib/db/upload_locks_db.dart
index dc2bfab079..24c0e397c3 100644
--- a/mobile/apps/photos/lib/db/upload_locks_db.dart
+++ b/mobile/apps/photos/lib/db/upload_locks_db.dart
@@ -53,12 +53,20 @@ class UploadLocksDB {
columnCreatedAt: "created_at",
);
+ static const _streamQueueTable = (
+ table: "stream_queue",
+ columnUploadedFileID: "uploaded_file_id",
+ columnQueueType: "queue_type", // 'create' or 'recreate'
+ columnCreatedAt: "created_at",
+ );
+
static final initializationScript = [
..._createUploadLocksTable(),
];
static final migrationScripts = [
..._createTrackUploadsTable(),
+ ..._createStreamQueueTable(),
];
final dbConfig = MigrationConfig(
@@ -137,11 +145,24 @@ class UploadLocksDB {
];
}
+ static List<String> _createStreamQueueTable() {
+ return [
+ '''
+ CREATE TABLE IF NOT EXISTS ${_streamQueueTable.table} (
+ ${_streamQueueTable.columnUploadedFileID} INTEGER PRIMARY KEY,
+ ${_streamQueueTable.columnQueueType} TEXT NOT NULL,
+ ${_streamQueueTable.columnCreatedAt} INTEGER DEFAULT CURRENT_TIMESTAMP NOT NULL
+ )
+ ''',
+ ];
+ }
+
Future<void> clearTable() async {
final db = await instance.database;
await db.delete(_uploadLocksTable.table);
await db.delete(_trackUploadTable.table);
await db.delete(_partsTable.table);
+ await db.delete(_streamQueueTable.table);
}
Future<void> acquireLock(String id, String owner, int time) async {
@@ -519,4 +540,56 @@ class UploadLocksDB {
return row[_trackUploadTable.columnEncryptedFileName] as String;
});
}
+
+ // Stream Queue Management Methods
+ Future<void> addToStreamQueue(
+ int uploadedFileID,
+ String queueType, // 'create' or 'recreate'
+ ) async {
+ final db = await instance.database;
+ await db.insert(
+ _streamQueueTable.table,
+ {
+ _streamQueueTable.columnUploadedFileID: uploadedFileID,
+ _streamQueueTable.columnQueueType: queueType,
+ },
+ conflictAlgorithm: ConflictAlgorithm.replace,
+ );
+ }
+
+ Future<void> removeFromStreamQueue(int uploadedFileID) async {
+ final db = await instance.database;
+ await db.delete(
+ _streamQueueTable.table,
+ where: '${_streamQueueTable.columnUploadedFileID} = ?',
+ whereArgs: [uploadedFileID],
+ );
+ }
+
+ Future<Map<int, String>> getStreamQueue() async {
+ final db = await instance.database;
+ final rows = await db.query(
+ _streamQueueTable.table,
+ columns: [
+ _streamQueueTable.columnUploadedFileID,
+ _streamQueueTable.columnQueueType,
+ ],
+ );
+ final map = <int, String>{};
+ for (final row in rows) {
+ map[row[_streamQueueTable.columnUploadedFileID] as int] =
+ row[_streamQueueTable.columnQueueType] as String;
+ }
+ return map;
+ }
+
+ Future<bool> isInStreamQueue(int uploadedFileID) async {
+ final db = await instance.database;
+ final rows = await db.query(
+ _streamQueueTable.table,
+ where: '${_streamQueueTable.columnUploadedFileID} = ?',
+ whereArgs: [uploadedFileID],
+ );
+ return rows.isNotEmpty;
+ }
}
diff --git a/mobile/apps/photos/lib/l10n/intl_en.arb b/mobile/apps/photos/lib/l10n/intl_en.arb
index 46da096a64..0b0c8af5d0 100644
--- a/mobile/apps/photos/lib/l10n/intl_en.arb
+++ b/mobile/apps/photos/lib/l10n/intl_en.arb
@@ -1832,5 +1832,12 @@
"totalVideos": "Total videos",
"skippedVideos": "Skipped videos",
"videoStreamingDescription": "Play videos instantly on any device. Enable to process video streams on this device.",
- "videoStreamingNote": "Only videos from last 60 days and under 1 minute are processed on this device. For older/longer videos, enable streaming in the desktop app."
+ "videoStreamingNote": "Only videos from last 60 days and under 1 minute are processed on this device. For older/longer videos, enable streaming in the desktop app.",
+ "createStream": "Create stream",
+ "recreateStream": "Recreate stream",
+ "addedToStreamCreationQueue": "Added to stream creation queue",
+ "addedToStreamRecreationQueue": "Added to stream recreation queue",
+ "videoPreviewAlreadyExists": "Video preview already exists",
+ "videoAlreadyInQueue": "Video file already present in the queue",
+ "addedToQueue": "Added to queue"
}
\ No newline at end of file
diff --git a/mobile/apps/photos/lib/services/video_preview_service.dart b/mobile/apps/photos/lib/services/video_preview_service.dart
index fd67c0b2ce..3d4b3eb6b6 100644
--- a/mobile/apps/photos/lib/services/video_preview_service.dart
+++ b/mobile/apps/photos/lib/services/video_preview_service.dart
@@ -19,6 +19,7 @@ import "package:photos/core/network/network.dart";
import 'package:photos/db/files_db.dart';
import "package:photos/db/upload_locks_db.dart";
import "package:photos/events/video_streaming_changed.dart";
+import 'package:photos/generated/intl/app_localizations.dart';
import "package:photos/models/base/id.dart";
import "package:photos/models/ffmpeg/ffprobe_props.dart";
import "package:photos/models/file/file.dart";
@@ -111,8 +112,76 @@ class VideoPreviewService {
_items.clear();
}
+ Future<bool> addToManualQueue(EnteFile file, String queueType) async {
+ if (file.uploadedFileID == null) return false;
+
+ // Check if already in queue
+ final bool alreadyInQueue =
+ await UploadLocksDB.instance.isInStreamQueue(file.uploadedFileID!);
+ if (alreadyInQueue) {
+ return false; // Indicates file was already in queue
+ }
+
+ // Add to persistent database queue
+ await UploadLocksDB.instance
+ .addToStreamQueue(file.uploadedFileID!, queueType);
+
+ _items[file.uploadedFileID!] = PreviewItem(
+ status: PreviewItemStatus.inQueue,
+ file: file,
+ retryCount: 0,
+ collectionID: file.collectionID ?? 0,
+ );
+ fileQueue[file.uploadedFileID!] = file;
+
+ // Start processing if not already processing
+ if (uploadingFileId < 0) {
+ queueFiles(duration: Duration.zero);
+ }
+
+ return true; // Indicates file was successfully added to queue
+ }
+
+ Future<void> removeFromManualQueue(int uploadedFileID) async {
+ await UploadLocksDB.instance.removeFromStreamQueue(uploadedFileID);
+ }
+
+ Future<bool> isInManualQueue(int? uploadedFileID) async {
+ if (uploadedFileID == null) return false;
+
+ try {
+ // Check database directly instead of relying on in-memory _manualQueueFiles
+ // which might not be populated yet
+ return await UploadLocksDB.instance.isInStreamQueue(uploadedFileID);
+ } catch (_) {
+ return false;
+ }
+ }
+
+ Future<bool> _isRecreateOperation(EnteFile file) async {
+ if (file.uploadedFileID == null) return false;
+
+ try {
+ // Check database directly instead of relying on in-memory _manualQueueFiles
+ // which might not be populated yet
+ final manualQueueFiles = await UploadLocksDB.instance.getStreamQueue();
+ final queueType = manualQueueFiles[file.uploadedFileID!];
+ return queueType == 'recreate';
+ } catch (_) {
+ return false;
+ }
+ }
+
+ Future<void> _ensurePreviewIdsInitialized() async {
+ // Ensure fileDataService previewIds is initialized before using it
+ if (fileDataService.previewIds.isEmpty) {
+ await fileDataService.syncFDStatus();
+ }
+ }
+
Future<bool> isSharedFileStreamble(EnteFile file) async {
try {
+ await _ensurePreviewIdsInitialized();
if (fileDataService.previewIds.containsKey(file.uploadedFileID)) {
return true;
}
@@ -134,6 +203,7 @@ class VideoPreviewService {
Future<StreamingStatus> getStatus() async {
try {
// TODO: Should we consider all days we could have processed or last 60 days
+ await _ensurePreviewIdsInitialized();
final files = await _getFiles();
final Set<int> totalProcessed = fileDataService.previewIds.keys.toSet();
final Set<int> total = {};
@@ -190,10 +260,14 @@ class VideoPreviewService {
return;
}
try {
- // check if playlist already exist
- if (await getPlaylist(enteFile) != null) {
+ // check if playlist already exist, but skip this check for 'recreate' operations
+ final isRecreateOperation = await _isRecreateOperation(enteFile);
+ if (!isRecreateOperation && await getPlaylist(enteFile) != null) {
if (ctx != null && ctx.mounted) {
- showShortToast(ctx, 'Video preview already exists');
+ showShortToast(
+ ctx,
+ AppLocalizations.of(ctx).videoPreviewAlreadyExists,
+ );
}
removeFile = true;
return;
@@ -471,6 +545,8 @@ class VideoPreviewService {
Future<void> _removeFromLocks(EnteFile enteFile) async {
final bool isFailurePresent =
_failureFiles?.contains(enteFile.uploadedFileID!) ?? false;
+ final bool isInManualQueue =
+ await UploadLocksDB.instance.isInStreamQueue(enteFile.uploadedFileID!);
if (isFailurePresent) {
await UploadLocksDB.instance.deleteStreamUploadErrorEntry(
@@ -478,6 +554,10 @@ class VideoPreviewService {
);
_failureFiles?.remove(enteFile.uploadedFileID!);
}
+
+ if (isInManualQueue) {
+ await removeFromManualQueue(enteFile.uploadedFileID!);
+ }
}
void _removeFile(EnteFile enteFile) {
@@ -684,12 +764,13 @@ class VideoPreviewService {
final tempDir = await getTemporaryDirectory();
final playlistFile = File("${tempDir.path}/${file.uploadedFileID}.m3u8");
await playlistFile.writeAsString(finalPlaylist);
- final String log = (StringBuffer()
- ..write("[CACHE-STATUS] ")
- ..write("Video: ${videoFile != null ? 'βœ“' : 'βœ—'} | ")
- ..write("Details: ${detailsCache != null ? 'βœ“' : 'βœ—'} | ")
- ..write("Playlist: ${playlistCache != null ? 'βœ“' : 'βœ—'}"))
- .toString();
+ final String log = (
+ StringBuffer()
+ ..write("[CACHE-STATUS] ")
+ ..write("Video: ${videoFile != null ? 'βœ“' : 'βœ—'} | ")
+ ..write("Details: ${detailsCache != null ? 'βœ“' : 'βœ—'} | ")
+ ..write("Playlist: ${playlistCache != null ? 'βœ“' : 'βœ—'}"),
+ ).toString();
_logger.info("Mapped playlist to ${playlistFile.path}, $log");
final data = PlaylistData(
preview: playlistFile,
@@ -849,23 +930,104 @@ class VideoPreviewService {
if (!isVideoStreamingEnabled || !await canUseHighBandwidth()) return;
Map<int, String> failureFiles = {};
+ Map<int, String> manualQueueFiles = {};
try {
failureFiles = await UploadLocksDB.instance.getStreamUploadError();
_failureFiles = {...failureFiles.keys};
+ manualQueueFiles = await UploadLocksDB.instance.getStreamQueue();
+
// handle case when failures are already previewed
for (final failure in _failureFiles!) {
if (_items.containsKey(failure)) {
UploadLocksDB.instance.deleteStreamUploadErrorEntry(failure).ignore();
}
}
+
+ // handle case when manual queue items are already previewed (for 'create' type only)
+ for (final queueItem in manualQueueFiles.keys) {
+ final queueType = manualQueueFiles[queueItem];
+ final hasPreview = fileDataService.previewIds[queueItem] != null;
+ if (hasPreview && queueType == 'create') {
+ // Remove from queue only if it's a 'create' type and preview exists
+ await UploadLocksDB.instance.removeFromStreamQueue(queueItem);
+ }
+ }
+
+ // Refresh manual queue after cleanup
+ manualQueueFiles = await UploadLocksDB.instance.getStreamQueue();
} catch (_) {}
final files = await _getFiles();
-
final previewIds = fileDataService.previewIds;
- final allFiles =
- files.where((file) => previewIds[file.uploadedFileID] == null).toList();
+
+ _logger.info(
+ "[init] Found ${files.length} files in last 60 days, ${manualQueueFiles.length} manual queue files: ${manualQueueFiles.keys.toList()}",
+ );
+
+ // Add manual queue files first (they have priority)
+ for (final queueFileId in manualQueueFiles.keys) {
+ final queueType = manualQueueFiles[queueFileId] ?? 'create';
+ final hasPreview = previewIds[queueFileId] != null;
+
+ _logger.info(
+ "[manual-queue] Processing file $queueFileId: type=$queueType, hasPreview=$hasPreview",
+ );
+
+ // For recreate, always add to queue regardless of existing preview
+ // For create, only add if no preview exists
+ if (queueType == 'recreate' || !hasPreview) {
+ // First try to find the file in the 60-day list
+ var queueFile =
+ files.firstWhereOrNull((f) => f.uploadedFileID == queueFileId);
+
+ // If not found in 60-day list, fetch it individually
+ if (queueFile == null) {
+ _logger.info(
+ "[manual-queue] File $queueFileId not found in 60-day list, fetching individually",
+ );
+ try {
+ queueFile = await FilesDB.instance.getAnyUploadedFile(queueFileId);
+ _logger.info(
+ "[manual-queue] Successfully fetched file $queueFileId individually",
+ );
+ } catch (e) {
+ _logger.warning(
+ "Failed to fetch manual queue file $queueFileId",
+ e,
+ );
+ continue;
+ }
+ } else {
+ _logger.info("[manual-queue] File $queueFileId found in 60-day list");
+ }
+
+ if (queueFile != null) {
+ _items[queueFile.uploadedFileID!] = PreviewItem(
+ status: PreviewItemStatus.inQueue,
+ file: queueFile,
+ collectionID: queueFile.collectionID ?? 0,
+ );
+ fileQueue[queueFile.uploadedFileID!] = queueFile;
+ _logger.info(
+ "[manual-queue] Added file $queueFileId to processing queue",
+ );
+ }
+ } else {
+ _logger.info(
+ "[manual-queue] Skipping file $queueFileId (type=$queueType, hasPreview=$hasPreview)",
+ );
+ }
+ }
+
+ // Then add regular files that need processing
+ final allFiles = files
+ .where(
+ (file) =>
+ previewIds[file.uploadedFileID] == null &&
+ !manualQueueFiles.containsKey(file.uploadedFileID),
+ )
+ .toList();
// set all video status to in queue
var n = allFiles.length, i = 0;
@@ -901,12 +1063,15 @@ class VideoPreviewService {
i++;
}
- if (allFiles.isEmpty) {
+ final totalFiles = fileQueue.length;
+ if (totalFiles == 0) {
_logger.info("[init] No preview to cache");
return;
}
- _logger.info("[init] Processing ${allFiles.length} items for streaming");
+ _logger.info(
+ "[init] Processing $totalFiles items for streaming (${manualQueueFiles.length} manual requested, ${fileQueue.length} queued, ${allFiles.length} regular)",
+ );
// take first file and put it for stream generation
final entry = fileQueue.entries.first;
diff --git a/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart b/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart
index 06d35ed582..c57cbf98cf 100644
--- a/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart
@@ -23,6 +23,7 @@ import "package:photos/services/local_authentication_service.dart";
import "package:photos/services/video_preview_service.dart";
import "package:photos/theme/ente_theme.dart";
import 'package:photos/ui/collections/collection_action_sheet.dart';
+import "package:photos/ui/common/popup_item.dart";
import 'package:photos/ui/notification/toast.dart';
import "package:photos/ui/viewer/file_details/favorite_widget.dart";
import "package:photos/ui/viewer/file_details/upload_icon_widget.dart";
@@ -193,22 +194,13 @@ class FileAppBarState extends State<FileAppBar> {
final List<PopupMenuItem> items = [];
if (widget.file.isRemoteFile) {
items.add(
- PopupMenuItem(
+ EntePopupMenuItem(
+ AppLocalizations.of(context).download,
value: 1,
- child: Row(
- children: [
- Icon(
- Platform.isAndroid
- ? Icons.download
- : Icons.cloud_download_outlined,
- color: Theme.of(context).iconTheme.color,
- ),
- const Padding(
- padding: EdgeInsets.all(8),
- ),
- Text(AppLocalizations.of(context).download),
- ],
- ),
+ icon: Platform.isAndroid
+ ? Icons.download
+ : Icons.cloud_download_outlined,
+ iconColor: Theme.of(context).iconTheme.color,
),
);
}
@@ -217,24 +209,13 @@ class FileAppBarState extends State<FileAppBar> {
final bool isArchived =
widget.file.magicMetadata.visibility == archiveVisibility;
items.add(
- PopupMenuItem(
+ EntePopupMenuItem(
+ isArchived
+ ? AppLocalizations.of(context).unarchive
+ : AppLocalizations.of(context).archive,
value: 2,
- child: Row(
- children: [
- Icon(
- isArchived ? Icons.unarchive : Icons.archive_outlined,
- color: Theme.of(context).iconTheme.color,
- ),
- const Padding(
- padding: EdgeInsets.all(8),
- ),
- Text(
- isArchived
- ? AppLocalizations.of(context).unarchive
- : AppLocalizations.of(context).archive,
- ),
- ],
- ),
+ icon: isArchived ? Icons.unarchive : Icons.archive_outlined,
+ iconColor: Theme.of(context).iconTheme.color,
),
);
}
@@ -242,118 +223,100 @@ class FileAppBarState extends State<FileAppBar> {
widget.file.fileType == FileType.livePhoto) &&
Platform.isAndroid) {
items.add(
- PopupMenuItem(
+ EntePopupMenuItem(
+ AppLocalizations.of(context).setAs,
value: 3,
- child: Row(
- children: [
- Icon(
- Icons.wallpaper_outlined,
- color: Theme.of(context).iconTheme.color,
- ),
- const Padding(
- padding: EdgeInsets.all(8),
- ),
- Text(AppLocalizations.of(context).setAs),
- ],
- ),
+ icon: Icons.wallpaper_outlined,
+ iconColor: Theme.of(context).iconTheme.color,
),
);
}
if (isOwnedByUser && widget.file.isUploaded) {
if (!isFileHidden) {
items.add(
- PopupMenuItem(
+ EntePopupMenuItem(
+ AppLocalizations.of(context).hide,
value: 4,
- child: Row(
- children: [
- Icon(
- Icons.visibility_off,
- color: Theme.of(context).iconTheme.color,
- ),
- const Padding(
- padding: EdgeInsets.all(8),
- ),
- Text(AppLocalizations.of(context).hide),
- ],
- ),
+ icon: Icons.visibility_off,
+ iconColor: Theme.of(context).iconTheme.color,
),
);
} else {
items.add(
- PopupMenuItem(
+ EntePopupMenuItem(
+ AppLocalizations.of(context).unhide,
value: 5,
- child: Row(
- children: [
- Icon(
- Icons.visibility,
- color: Theme.of(context).iconTheme.color,
- ),
- const Padding(
- padding: EdgeInsets.all(8),
- ),
- Text(AppLocalizations.of(context).unhide),
- ],
- ),
+ icon: Icons.visibility,
+ iconColor: Theme.of(context).iconTheme.color,
),
);
}
}
items.add(
- PopupMenuItem(
+ EntePopupMenuItem(
+ AppLocalizations.of(context).guestView,
value: 6,
- child: Row(
- children: [
- SvgPicture.asset(
- "assets/icons/guest_view_icon.svg",
- colorFilter: ColorFilter.mode(
- getEnteColorScheme(context).textBase,
- BlendMode.srcIn,
- ),
- ),
- const Padding(
- padding: EdgeInsets.all(8),
- ),
- Text(AppLocalizations.of(context).guestView),
- ],
+ iconWidget: SvgPicture.asset(
+ "assets/icons/guest_view_icon.svg",
+ colorFilter: ColorFilter.mode(
+ getEnteColorScheme(context).textBase,
+ BlendMode.srcIn,
+ ),
),
),
);
if (widget.file.isVideo) {
+ // Video streaming options
+ if (_shouldShowCreateStreamOption()) {
+ items.add(
+ EntePopupMenuItem(
+ AppLocalizations.of(context).createStream,
+ value: 8,
+ icon: Icons.video_settings_outlined,
+ iconColor: Theme.of(context).iconTheme.color,
+ ),
+ );
+ }
+
+ if (_shouldShowRecreateStreamOption()) {
+ items.add(
+ EntePopupMenuItem(
+ AppLocalizations.of(context).recreateStream,
+ value: 9,
+ icon: Icons.refresh_outlined,
+ iconColor: Theme.of(context).iconTheme.color,
+ ),
+ );
+ }
+
items.add(
- PopupMenuItem(
+ EntePopupMenuItem(
+ shouldLoopVideo
+ ? AppLocalizations.of(context).loopVideoOn
+ : AppLocalizations.of(context).loopVideoOff,
value: 7,
- child: Row(
+ iconWidget: Stack(
+ alignment: Alignment.center,
children: [
- Stack(
- alignment: Alignment.center,
- children: [
- Icon(
- Icons.loop_rounded,
- color: Theme.of(context).iconTheme.color,
- ),
- shouldLoopVideo
- ? const SizedBox.shrink()
- : Transform.rotate(
- angle: 3.14 / 4,
- child: Container(
- width: 2,
- height: 24,
- decoration: BoxDecoration(
- color: Theme.of(context).iconTheme.color,
- borderRadius: BorderRadius.circular(1),
- ),
- ),
- ),
- ],
- ),
- const Padding(
- padding: EdgeInsets.all(8),
+ Icon(
+ Icons.loop_rounded,
+ color: Theme.of(context).iconTheme.color,
),
shouldLoopVideo
- ? Text(AppLocalizations.of(context).loopVideoOn)
- : Text(AppLocalizations.of(context).loopVideoOff),
+ ? const SizedBox.shrink()
+ : Transform.rotate(
+ angle: 3.14 / 4,
+ child: Container(
+ width: 2,
+ height: 24,
+ decoration: BoxDecoration(
+ color: Theme.of(context).iconTheme.color,
+ borderRadius: BorderRadius.circular(1),
+ ),
+ ),
+ ),
],
),
),
@@ -392,6 +355,10 @@ class FileAppBarState extends State<FileAppBar> {
}
} else if (value == 7) {
_onToggleLoopVideo();
+ } else if (value == 8) {
+ await _handleVideoStream('create');
+ } else if (value == 9) {
+ await _handleVideoStream('recreate');
}
},
),
@@ -511,4 +478,47 @@ class FileAppBarState extends State<FileAppBar> {
await localSettings.setOnGuestView(false);
}
}
+
+ bool _shouldShowCreateStreamOption() {
+ // Show "Create Stream" option for uploaded video files without streams
+ return widget.file.fileType == FileType.video &&
+ widget.file.isUploaded &&
+ widget.file.uploadedFileID != null &&
+ !fileDataService.previewIds.containsKey(widget.file.uploadedFileID!);
+ }
+
+ bool _shouldShowRecreateStreamOption() {
+ // Show "Recreate Stream" option for uploaded video files with existing streams
+ return widget.file.fileType == FileType.video &&
+ widget.file.isUploaded &&
+ widget.file.uploadedFileID != null &&
+ fileDataService.previewIds.containsKey(widget.file.uploadedFileID!);
+ }
+
+ Future<void> _handleVideoStream(String streamType) async {
+ try {
+ final bool wasAdded = await VideoPreviewService.instance
+ .addToManualQueue(widget.file, streamType);
+
+ if (!wasAdded) {
+ // File was already in queue
+ showToast(
+ context,
+ AppLocalizations.of(context).videoAlreadyInQueue,
+ );
+ return;
+ }
+
+ showToast(context, AppLocalizations.of(context).addedToQueue);
+
+ if (mounted) {
+ setState(() {
+ _reloadActions = true;
+ });
+ }
+ } catch (e, s) {
+ _logger.severe("Failed to $streamType video stream", e, s);
+ await showGenericErrorDialog(context: context, error: e);
+ }
+ }
}