This commit is contained in:
Thomas 2020-12-24 11:57:27 +01:00
parent ccb6e184cc
commit d40b35da59
3 changed files with 7 additions and 2 deletions

View File

@ -455,6 +455,10 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
videoParams.setChannelId(channelToSendId);
videoParams.setPrivacy(finalPrivacyToSend.getId());
List<String> tags = binding.pVideoTags.getTags();
if (tags.size() > 5) {
Toasty.error(PeertubeEditUploadActivity.this, getString(R.string.max_tag_size), Toast.LENGTH_LONG).show();
return;
}
videoParams.setTags(tags);
binding.setUploadSubmit.setEnabled(false);
MyVideoVM myVideoVM = new ViewModelProvider(PeertubeEditUploadActivity.this).get(MyVideoVM.class);

View File

@ -83,7 +83,6 @@
android:layout_height="wrap_content"
android:labelFor="@+id/p_video_tags"
android:text="@string/tags" />
<mabbas007.tagsedittext.TagsEditText
android:id="@+id/p_video_tags"
android:layout_width="match_parent"
@ -93,8 +92,9 @@
android:minLines="2"
TagsEditText:allowSpaceInTag="true"
TagsEditText:tagsCloseImagePadding="@dimen/defaultTagsCloseImagePadding"
TagsEditText:tagsBackground="?colorAccent"
TagsEditText:tagsCloseImageRight="@drawable/tag_close"
TagsEditText:tagsTextColor="?colorAccent"
TagsEditText:tagsTextColor="@color/white"
TagsEditText:tagsTextSize="@dimen/defaultTagsTextSize" />
</LinearLayout>

View File

@ -447,4 +447,5 @@
<string name="live_not_started">This live has not started!</string>
<string name="remote_account">Account from another network!</string>
<string name="instance_not_availabe">Instance is not available!</string>
<string name="max_tag_size">The video should not have more than 5 tags!</string>
</resources>