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.setChannelId(channelToSendId);
videoParams.setPrivacy(finalPrivacyToSend.getId()); videoParams.setPrivacy(finalPrivacyToSend.getId());
List<String> tags = binding.pVideoTags.getTags(); 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); videoParams.setTags(tags);
binding.setUploadSubmit.setEnabled(false); binding.setUploadSubmit.setEnabled(false);
MyVideoVM myVideoVM = new ViewModelProvider(PeertubeEditUploadActivity.this).get(MyVideoVM.class); MyVideoVM myVideoVM = new ViewModelProvider(PeertubeEditUploadActivity.this).get(MyVideoVM.class);

View File

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

View File

@ -447,4 +447,5 @@
<string name="live_not_started">This live has not started!</string> <string name="live_not_started">This live has not started!</string>
<string name="remote_account">Account from another network!</string> <string name="remote_account">Account from another network!</string>
<string name="instance_not_availabe">Instance is not available!</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> </resources>