Do not allow forwarding of content more than 13 lines long to stories.

fork-5.53.8
Alex Hart 2022-10-11 12:17:21 -03:00 zatwierdzone przez Greyson Parrelli
rodzic 7477f3c319
commit 4cc6bb4fbe
2 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -168,6 +168,10 @@ public final class MultiShareArgs implements Parcelable {
return false;
}
if (!Util.isEmpty(getDraftText()) && getDraftText().split("\n").length > Stories.MAX_TEXT_STORY_LINE_COUNT) {
return false;
}
if (!Util.isEmpty(getDraftText())) {
BreakIteratorCompat breakIteratorCompat = BreakIteratorCompat.getInstance();
breakIteratorCompat.setText(getDraftText());

Wyświetl plik

@ -54,6 +54,7 @@ object Stories {
private val TAG = Log.tag(Stories::class.java)
const val MAX_TEXT_STORY_SIZE = 700
const val MAX_TEXT_STORY_LINE_COUNT = 13
const val MAX_CAPTION_SIZE = 1500
@JvmField