Skip to content

Commit

Permalink
Merge pull request #346 from bill0042/crafting1
Browse files Browse the repository at this point in the history
Fixes missing crafting pattern progress by searching character scoped records
  • Loading branch information
joaopmarquesini authored Jun 26, 2024
2 parents 4f520f8 + 220acbb commit 256de03
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/core/blocs/profile/craftables_helper.bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,14 @@ class CraftablesHelperBloc extends ChangeNotifier {
}
final recordHash = _itemToRecordHashMap[itemHash];
if (recordHash == null) return null;
return _profileBloc.getProfileRecord(recordHash);
final profileRecord = _profileBloc.getProfileRecord(recordHash);
if (profileRecord != null) return profileRecord;
return _profileBloc.characters
?.map((c) => c.characterId)
.whereType<String>()
.map((id) => _profileBloc.getCharacterRecord(id, recordHash))
.whereType<DestinyRecordComponent>()
.firstOrNull;
}

List<DestinyObjectiveProgress>? getItemCraftedObjectives(DestinyItemInfo item) {
Expand Down

0 comments on commit 256de03

Please sign in to comment.