Merge pull request #3772 from adinilfeld/copy-video-title

Copy video title
This commit is contained in:
Tobias Groza 2020-06-13 16:38:14 +02:00 committed by GitHub
commit 9ef7688f9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 12 deletions

View file

@ -479,7 +479,6 @@ public class VideoDetailFragment extends BaseStateFragment<StreamInfo>
case R.id.detail_controls_download:
NavigationHelper.openDownloads(getActivity());
break;
case R.id.detail_uploader_root_layout:
if (TextUtils.isEmpty(currentInfo.getSubChannelUrl())) {
Log.w(TAG,
@ -488,6 +487,9 @@ public class VideoDetailFragment extends BaseStateFragment<StreamInfo>
openChannel(currentInfo.getUploaderUrl(), currentInfo.getUploaderName());
}
break;
case R.id.detail_title_root_layout:
ShareUtils.copyToClipboard(getContext(), videoTitleTextView.getText().toString());
break;
}
return true;
@ -583,6 +585,7 @@ public class VideoDetailFragment extends BaseStateFragment<StreamInfo>
protected void initListeners() {
super.initListeners();
videoTitleRoot.setOnLongClickListener(this);
uploaderRootLayout.setOnClickListener(this);
uploaderRootLayout.setOnLongClickListener(this);
videoTitleRoot.setOnClickListener(this);