refreshRelations static method

Future<AlbumModel> refreshRelations(
  1. AlbumModel model
)

Implementation

static Future<AlbumModel> refreshRelations(AlbumModel model) async {
  List<AlbumEntryModel>? albumEntriesHolder;
  if (model.albumEntries != null) {
    albumEntriesHolder = List<AlbumEntryModel>.from(
            await Future.wait(model.albumEntries!.map((element) async {
      return await AlbumEntryCache.refreshRelations(element);
    })))
        .toList();
  }

  return model.copyWith(
    albumEntries: albumEntriesHolder,
  );
}