mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
Do not allow forwarding of content more than 13 lines long to stories.
This commit is contained in:
committed by
Greyson Parrelli
parent
7477f3c319
commit
4cc6bb4fbe
@@ -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());
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user