kopia lustrzana https://github.com/ryukoposting/Signal-Android
Do not allow forwarding of content more than 13 lines long to stories.
rodzic
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
|
||||
|
|
Ładowanie…
Reference in New Issue