Add own constant for maximum group invitation message length

This commit is contained in:
Torsten Grote
2016-10-26 07:28:51 -02:00
parent 1176741ea4
commit 09baa2ebe1
2 changed files with 7 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ import javax.inject.Inject;
import static android.support.v4.app.ActivityOptionsCompat.makeCustomAnimation; import static android.support.v4.app.ActivityOptionsCompat.makeCustomAnimation;
import static android.widget.Toast.LENGTH_SHORT; import static android.widget.Toast.LENGTH_SHORT;
import static org.briarproject.api.privategroup.PrivateGroupConstants.MAX_GROUP_POST_BODY_LENGTH; import static org.briarproject.api.privategroup.PrivateGroupConstants.MAX_GROUP_INVITATION_MSG_LENGTH;
public class CreateGroupActivity extends ContactSelectorActivity implements public class CreateGroupActivity extends ContactSelectorActivity implements
CreateGroupListener, MessageFragmentListener { CreateGroupListener, MessageFragmentListener {
@@ -148,7 +148,7 @@ public class CreateGroupActivity extends ContactSelectorActivity implements
@Override @Override
public int getMaximumMessageLength() { public int getMaximumMessageLength() {
return MAX_GROUP_POST_BODY_LENGTH; return MAX_GROUP_INVITATION_MSG_LENGTH;
} }
private void openNewGroup() { private void openNewGroup() {

View File

@@ -19,4 +19,9 @@ public interface PrivateGroupConstants {
*/ */
int MAX_GROUP_POST_BODY_LENGTH = MAX_MESSAGE_BODY_LENGTH - 1024; int MAX_GROUP_POST_BODY_LENGTH = MAX_MESSAGE_BODY_LENGTH - 1024;
/**
* The maximum length of a group invitation message in bytes.
*/
int MAX_GROUP_INVITATION_MSG_LENGTH = MAX_MESSAGE_BODY_LENGTH - 1024;
} }