Skip to content

Commit

Permalink
修复
Browse files Browse the repository at this point in the history
  • Loading branch information
jhqwqmc committed Aug 25, 2024
1 parent e78482a commit 291b007
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/lib/widgets/components/app/cinematic_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -386,12 +386,13 @@ String _longestEntryName(_LongestEntryNameRef ref) {
final entryIds = ref.watch(_cinematicEntryIdsProvider);
final names = entryIds
.map((entryId) => ref.watch(entryNameProvider(entryId)))
.where((element) => true)
.where((element) => element != null)
.cast<String>()
.toList() +
["追踪时长"];
return names.isEmpty
? ""
: names.reduce((a, b) => a.length > b.length ? a : b);
: names.reduce((a, b) => (a?.length ?? 0) > (b?.length ?? 0) ? a : b);
}

@riverpod
Expand Down
2 changes: 1 addition & 1 deletion app/lib/widgets/components/app/entry_search.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Fuzzy<EntryDefinition> _fuzzyEntries(_FuzzyEntriesRef ref) {
blueprint: blueprint,
entry: entry,
);
}).where((element) => true);
}).where((element) => element != null).cast<EntryDefinition>().toList();
}).toList();

return Fuzzy(
Expand Down

0 comments on commit 291b007

Please sign in to comment.