From c1e348a6ab58d9ddde7fcc39024a279ffec388ca Mon Sep 17 00:00:00 2001 From: jhqwqmc <2110242767@qq.com> Date: Sun, 25 Aug 2024 21:40:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/lib/models/entry.dart | 2 +- app/lib/widgets/components/app/cinematic_view.dart | 6 +++--- app/lib/widgets/components/app/entry_search.dart | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/lib/models/entry.dart b/app/lib/models/entry.dart index 8338922757..86e5590321 100644 --- a/app/lib/models/entry.dart +++ b/app/lib/models/entry.dart @@ -269,7 +269,7 @@ class Entry { } } if (item is List) { - item.replaceRange(0, item.length, item.map(mapper).whereNotNull()); + item.replaceRange(0, item.length, item.map(mapper).nonNulls()); } } diff --git a/app/lib/widgets/components/app/cinematic_view.dart b/app/lib/widgets/components/app/cinematic_view.dart index 3e0f21499c..3e81ff340e 100644 --- a/app/lib/widgets/components/app/cinematic_view.dart +++ b/app/lib/widgets/components/app/cinematic_view.dart @@ -163,7 +163,7 @@ List _allSegments(_AllSegmentsRef ref, String entryId) { final paths = ref.watch(_segmentPathsProvider(entryId)); return paths.keys .map((path) => ref.watch(_segmentsProvider(entryId, path))) - .whereNotNull() + .nonNulls() .expand((x) => x) .toList(); } @@ -386,7 +386,7 @@ String _longestEntryName(_LongestEntryNameRef ref) { final entryIds = ref.watch(_cinematicEntryIdsProvider); final names = entryIds .map((entryId) => ref.watch(entryNameProvider(entryId))) - .whereNotNull() + .nonNulls() .toList() + ["追踪时长"]; return names.isEmpty @@ -534,7 +534,7 @@ int _totalSequenceFrames(_TotalSequenceFramesRef ref) { final entryIds = ref.watch(_cinematicEntryIdsProvider); final frames = entryIds .map((entryId) => ref.watch(_endingFrameProvider(entryId))) - .whereNotNull() + .nonNulls() .toList(); return frames.map((frame) => frame).maxOrNull ?? 0; } diff --git a/app/lib/widgets/components/app/entry_search.dart b/app/lib/widgets/components/app/entry_search.dart index 477f8d8a89..04cfe305e6 100644 --- a/app/lib/widgets/components/app/entry_search.dart +++ b/app/lib/widgets/components/app/entry_search.dart @@ -94,7 +94,7 @@ Fuzzy _fuzzyEntries(_FuzzyEntriesRef ref) { blueprint: blueprint, entry: entry, ); - }).whereNotNull(); + }).nonNulls(); }).toList(); return Fuzzy(