public MouthCellViewModel CreateAndSetUpMouthCellViewModel(int mouthIndex) { MouthCellModel model = stickerCustomizationPopupModel.GetDataWithIndex(mouthIndex); MouthCellViewModel mouthCellViewModel = new MouthCellViewModel(model, cachedResourcesLoader); mouthCellViewModel.SelectionIntent.Subscribe(_ => selectedMouthModel.OnNext(model)); selectedMouthModel.Select(x => x.Id == mouthIndex).Subscribe(mouthCellViewModel.MouthActiveObserver); return(mouthCellViewModel); }
public MouthCellViewModel(MouthCellModel mouthCellModel, CachedResourcesLoader cachedResourcesLoader) { this.mouthCellModel = mouthCellModel; this.cachedResourcesLoader = cachedResourcesLoader; }