mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2026-09-24 18:01:51 +00:00
Add subject to shared URL's (fixes #975)
This commit is contained in:
@@ -19,6 +19,7 @@ import org.schabi.newpipe.MainActivity;
|
||||
import org.schabi.newpipe.R;
|
||||
import org.schabi.newpipe.ReCaptchaActivity;
|
||||
import org.schabi.newpipe.extractor.exceptions.ReCaptchaException;
|
||||
import org.schabi.newpipe.extractor.stream.StreamInfo;
|
||||
import org.schabi.newpipe.report.ErrorActivity;
|
||||
import org.schabi.newpipe.report.UserAction;
|
||||
import org.schabi.newpipe.util.ExtractorHelper;
|
||||
@@ -252,9 +253,10 @@ public abstract class BaseStateFragment<I> extends BaseFragment implements ViewC
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
protected void shareUrl(String url) {
|
||||
protected void shareUrl(String subject, String url) {
|
||||
Intent intent = new Intent(Intent.ACTION_SEND);
|
||||
intent.setType("text/plain");
|
||||
intent.putExtra(Intent.EXTRA_SUBJECT, subject);
|
||||
intent.putExtra(Intent.EXTRA_TEXT, url);
|
||||
startActivity(Intent.createChooser(intent, getString(R.string.share_dialog_title)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user