1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-12-26 04:48:51 +00:00

Simplify check

This commit is contained in:
Pierre HUBERT 2020-04-24 13:37:44 +02:00
parent 3a9bb3d13e
commit 60c135bf01

View File

@ -55,7 +55,8 @@ class _PostCreateFormWidgetState extends State<PostCreateFormWidget> {
bool get hasPDF => _postPDF != null;
bool get canSubmitForm =>
!_isCreating && _postTextController.text.length > 5 || hasImage || hasPDF;
!_isCreating && _postTextController.text.length > 5 ||
postKind != PostKind.TEXT;
PostKind get postKind {
if (hasImage)