fix: creating new album from search section stuck on loading state (#1665)

This commit is contained in:
Ashil 2024-01-19 13:33:32 +05:30 committed by GitHub
commit e78c898a48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,3 +1,5 @@
import "dart:async";
import "package:flutter/material.dart";
import "package:logging/logging.dart";
import "package:photos/core/event_bus.dart";
@ -211,9 +213,11 @@ extension SectionTypeExtensions on SectionType {
try {
final Collection c =
await CollectionsService.instance.createAlbum(text);
await routeToPage(
context,
CollectionPage(CollectionWithThumbnail(c, null)),
unawaited(
routeToPage(
context,
CollectionPage(CollectionWithThumbnail(c, null)),
),
);
} catch (e, s) {
Logger("CreateNewAlbumIcon")