RQProfileUserAndVipItemViewModel.m 924 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // RQProfileUserAndVipItemViewModel.m
  3. // jiaPei
  4. //
  5. // Created by 张嵘 on 2022/4/26.
  6. // Copyright © 2022 JCZ. All rights reserved.
  7. //
  8. #import "RQProfileUserAndVipItemViewModel.h"
  9. @interface RQProfileUserAndVipItemViewModel ()
  10. @property (nonatomic, readwrite, strong) RQUserModel *userModel;
  11. @end
  12. @implementation RQProfileUserAndVipItemViewModel
  13. - (instancetype)initViewModelWithUser:(RQUserModel *)user {
  14. if (self = [super init]) {
  15. @weakify(self)
  16. self.userModel = user;
  17. [[RACObserve(RQ_COMMON_MANAGER, APP_SWITCH) takeUntil:self.rac_willDeallocSignal] subscribeNext:^(id _Nullable x) {
  18. @strongify(self)
  19. // self.itemSize = CGSizeMake(RQ_SCREEN_WIDTH, RQ_COMMON_MANAGER.APP_SWITCH? RQ_FIT_HORIZONTAL(158.f) : RQ_FIT_HORIZONTAL(328.f));
  20. self.itemSize = CGSizeMake(RQ_SCREEN_WIDTH, RQ_FIT_HORIZONTAL(328.f));
  21. }];
  22. }
  23. return self;
  24. }
  25. @end