Skip to content

Commit 2ac3171

Browse files
gnpricechrisbobbe
authored andcommitted
android [nfc]: Pull constants off TextCompressionModule
1 parent 82d8ac9 commit 2ac3171

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

android/app/src/main/java/com/zulipmobile/TextCompression.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ import java.util.zip.Inflater
1414

1515
// TODO: Write unit tests; see
1616
// https://github.com/zulip/zulip-mobile/blob/main/docs/howto/testing.md#unit-tests-android.
17+
18+
// TODO: Experiment what value gives the best performance.
19+
private const val bufferSize = 8192
20+
21+
private const val header = "z|zlib base64|"
22+
1723
internal class TextCompressionModule(reactContext: ReactApplicationContext?) :
1824
ReactContextBaseJavaModule(reactContext) {
1925
override fun getName(): String = "TextCompressionModule"
2026

21-
// TODO: Experiment what value gives the best performance.
22-
private val bufferSize = 8192
23-
24-
private val header = "z|zlib base64|"
2527
override fun getConstants(): Map<String, Any> = hashMapOf("header" to header)
2628

2729
@ReactMethod

0 commit comments

Comments
 (0)