refreshRelations static method
Implementation
static Future<FollowingModel> refreshRelations(FollowingModel model) async {
MemberPublicInfoModel? followerHolder;
if (model.follower != null) {
try {
await memberPublicInfoRepository(appId: model.appId)!
.get(model.follower!.documentID)
.then((val) {
followerHolder = val;
}).catchError((error) {});
} catch (_) {}
}
MemberPublicInfoModel? followedHolder;
if (model.followed != null) {
try {
await memberPublicInfoRepository(appId: model.appId)!
.get(model.followed!.documentID)
.then((val) {
followedHolder = val;
}).catchError((error) {});
} catch (_) {}
}
return model.copyWith(
follower: followerHolder,
followed: followedHolder,
);
}