NYFloatingSuggestViewModel.m 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // NYFloatingSuggestViewModel.m
  3. // jiaPei
  4. //
  5. // Created by Ning.ge on 2023/6/30.
  6. // Copyright © 2023 JCZ. All rights reserved.
  7. //
  8. #import "NYFloatingSuggestViewModel.h"
  9. #import "NYFloatingSuggestViewModel.h"
  10. #import "NYComplaintListViewController.h"
  11. @implementation NYFloatingSuggestViewModel
  12. - (instancetype)init {
  13. self = [super init];
  14. if (self) {
  15. [self setupCommands];
  16. }
  17. return self;
  18. }
  19. - (void)setupCommands {
  20. @weakify(self)
  21. self.iconCommand = [[RACCommand alloc] initWithSignalBlock:^RACSignal * _Nonnull(id _Nullable input) {
  22. @strongify(self);
  23. NYComplaintListViewController *complaintListViewController = [[NYComplaintListViewController alloc] init];
  24. [RQControllerHelper.currentViewController.navigationController qmui_pushViewController:complaintListViewController animated:YES completion:nil];
  25. return [RACSignal empty];
  26. }];
  27. self.closeCommand = [[RACCommand alloc] initWithSignalBlock:^RACSignal * _Nonnull(id _Nullable input) {
  28. @strongify(self);
  29. self.floatingSuggestView.hidden = YES;
  30. return [RACSignal empty];
  31. }];
  32. }
  33. @end