Nessuna descrizione

FKCirAllCommentViewModel.m 969B

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // FKCirAllCommentViewModel.m
  3. // FirstLink
  4. //
  5. // Created by jack on 16/6/16.
  6. // Copyright © 2016年 FirstLink. All rights reserved.
  7. //
  8. #import "FKCirAllCommentViewModel.h"
  9. @implementation FKCirAllCommentViewModel
  10. - (NSString *)getCommentPlaceHolderWithRow:(NSInteger)row{
  11. // if (self.defaultCommentItem) {
  12. // return [NSString stringWithFormat:@"回复 %@", self.defaultCommentItem.buyerNickName];
  13. // }
  14. FKCircleCommentItem *item = [self commentItemAtIndex:row];
  15. if (![item isSelfComment]){
  16. return [NSString stringWithFormat:@"回复 %@", item.nickName];
  17. }
  18. return @"";
  19. }
  20. - (void)appendMoreContent:(NSArray *)moreArray{
  21. if (moreArray.count <= 0) return;
  22. self.dataArray = [self.dataArray arrayByAddingObjectsFromArray:moreArray];
  23. }
  24. - (FKCircleCommentItem *)commentItemAtIndex:(NSInteger)index{
  25. if (index >= 0 && index < self.dataArray.count) {
  26. return self.dataArray[index];
  27. }
  28. return nil;
  29. }
  30. @end