Load less messages initially

// FREEBIE
pull/1/head
Michael Kirk 7 years ago
parent 9a731027a8
commit 97324eaae1

@ -98,15 +98,22 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
// Always load up to 50 messages when user arrives. // Always load up to n messages when user arrives.
static const int kYapDatabasePageSize = 50; //
// Never show more than 50*500 = 25k messages in conversation view at a time. // The smaller this number is, the faster the conversation can display.
static const int kYapDatabaseMaxPageCount = 500; // To test, shrink you accessability font as much as possible, then count how many 1-line system info messages (our shortest cells) can
// Never show more than 6*50 = 300 messages in conversation view when user // fit on screen at a time on an iPhoneX
// arrives. //
static const int kYapDatabaseMaxInitialPageCount = 6; // PERF: we could do less messages on shorter (older, slower) devices
static const int kConversationInitialMaxRangeSize = kYapDatabasePageSize * kYapDatabaseMaxInitialPageCount; // PERF: we could cache the cell height, since some messages will be much taller.
static const int kYapDatabaseRangeMaxLength = kYapDatabasePageSize * kYapDatabaseMaxPageCount; static const int kYapDatabasePageSize = 25;
// Never show more than n messages in conversation view when user arrives.
static const int kConversationInitialMaxRangeSize = 300;
// Never show more than n messages in conversation view at a time.
static const int kYapDatabaseRangeMaxLength = 25000;
static const int kYapDatabaseRangeMinLength = 0; static const int kYapDatabaseRangeMinLength = 0;
static const CGFloat kLoadMoreHeaderHeight = 60.f; static const CGFloat kLoadMoreHeaderHeight = 60.f;

Loading…
Cancel
Save