Skip to content

Commit 84df633

Browse files
authored
Merge pull request #20911 from wordpress-mobile/issue/18727-cursor-window-size
Increase Cursor Window Size to 20mb to load larger posts
2 parents 04851b3 + a1f3c73 commit 84df633

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package org.wordpress.android
2+
3+
import android.content.Context
4+
import org.wordpress.android.fluxc.persistence.WellSqlConfig
5+
6+
class WPWellSqlConfig(context: Context) : WellSqlConfig(context) {
7+
/**
8+
* Increase the cursor window size to 20MB for devices running API 28 and above. This should reduce the
9+
* number of SQLiteBlobTooBigExceptions. Note that this is only called on API 28 and
10+
* above since earlier versions don't allow adjusting the cursor window size.
11+
*/
12+
@Suppress("MagicNumber")
13+
override fun getCursorWindowSize() = (1024L * 1024L * 20L)
14+
}

WordPress/src/release/java/org/wordpress/android/WellSqlInitializer.kt

-15
This file was deleted.

0 commit comments

Comments
 (0)