|
|
@ -91,6 +91,24 @@ typedef NS_ENUM(NSUInteger, ConversationUpdateItemType) {
|
|
|
|
|
|
|
|
|
|
|
|
#pragma mark -
|
|
|
|
#pragma mark -
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Always load up to n messages when user arrives.
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// The smaller this number is, the faster the conversation can display.
|
|
|
|
|
|
|
|
// To test, shrink you accessibility font as much as possible, then count how many 1-line system info messages (our
|
|
|
|
|
|
|
|
// shortest cells) can fit on screen at a time on an iPhoneX
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// PERF: we could do less messages on shorter (older, slower) devices
|
|
|
|
|
|
|
|
// PERF: we could cache the cell height, since some messages will be much taller.
|
|
|
|
|
|
|
|
static const int kYapDatabasePageSize = 250;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Never show more than n messages in conversation view when user arrives.
|
|
|
|
|
|
|
|
static const int kConversationInitialMaxRangeSize = 250;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Never show more than n messages in conversation view at a time.
|
|
|
|
|
|
|
|
static const int kYapDatabaseRangeMaxLength = 250;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#pragma mark -
|
|
|
|
|
|
|
|
|
|
|
|
@interface ConversationViewModel : NSObject
|
|
|
|
@interface ConversationViewModel : NSObject
|
|
|
|
|
|
|
|
|
|
|
|
@property (nonatomic, readonly) ConversationViewState *viewState;
|
|
|
|
@property (nonatomic, readonly) ConversationViewState *viewState;
|
|
|
|