浏览代码

fix: creating new album from search section stuck on loading state

ashilkn 1 年之前
父节点
当前提交
2a7d6428a0
共有 1 个文件被更改,包括 7 次插入3 次删除
  1. 7 3
      lib/models/search/search_types.dart

+ 7 - 3
lib/models/search/search_types.dart

@@ -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")