TConversationListViewModel Class Reference

Inherits from NSObject
Declared in TConversationListViewModel.h
TConversationListViewModel.m

Overview

【模块名称】消息列表视图模型(TConversationListViewModel)

【功能说明】负责实现消息列表中的部分数据处理和业务逻辑 1、视图模型能够通过 IM SDK 提供的接口从服务端拉取会话列表数据,并将数据加载。 2、视图模型能够在用户需要删除会话列表时,同步移除会话列表的数据。

Other Methods

– init

- (instancetype)init

– onRefreshNotification:

- (void)onRefreshNotification:(NSNotification *)no

– onNewMessageNotification:

- (void)onNewMessageNotification:(NSNotification *)no

– cellDataOf:

- (TUIConversationCellData *)cellDataOf:(NSString *)convId

– dealloc

- (void)dealloc

– loadConversation

加载会话数据

- (void)loadConversation

Declared In

TConversationListViewModel.h

– updateConversation:

- (void)updateConversation:(NSArray<TIMConversation*> *)convs

– sortDataList:

- (void)sortDataList:(NSMutableArray<TUIConversationCellData*> *)dataList

– fixMissIds

- (void)fixMissIds

– removeData:

删除会话数据

- (void)removeData:(TUIConversationCellData *)data

Declared In

TConversationListViewModel.h

– getLastDisplayString:

- (NSString *)getLastDisplayString:(TIMConversation *)conv

Other Methods

  dataList

会话数据

@property (strong) NSArray<TUIConversationCellData*> *dataList

Declared In

TConversationListViewModel.h

  listFilter

过滤器

@property (copy) ConversationListFilterBlock listFilter

Declared In

TConversationListViewModel.h

Extension Methods

  isLoadFinished

@property BOOL isLoadFinished

  isLoading

@property BOOL isLoading

  missC2CIds

@property (nonatomic, strong) NSMapTable *missC2CIds

  missGroupIds

@property (nonatomic, strong) NSMapTable *missGroupIds