12345678910111213141516171819202122232425262728 |
- //
- // RQProfileUserAndVipItemViewModel.m
- // jiaPei
- //
- // Created by 张嵘 on 2022/4/26.
- // Copyright © 2022 JCZ. All rights reserved.
- //
- #import "RQProfileUserAndVipItemViewModel.h"
- @interface RQProfileUserAndVipItemViewModel ()
- @property (nonatomic, readwrite, strong) RQUserModel *userModel;
- @end
- @implementation RQProfileUserAndVipItemViewModel
- - (instancetype)initViewModelWithUser:(RQUserModel *)user {
- if (self = [super init]) {
- @weakify(self)
- self.userModel = user;
- [[RACObserve(RQ_COMMON_MANAGER, APP_SWITCH) takeUntil:self.rac_willDeallocSignal] subscribeNext:^(id _Nullable x) {
- @strongify(self)
- self.itemSize = CGSizeMake(RQ_SCREEN_WIDTH, RQ_COMMON_MANAGER.APP_SWITCH? RQ_FIT_HORIZONTAL(158.f) : RQ_FIT_HORIZONTAL(328.f));
- }];
- }
- return self;
- }
- @end
|