use of forpdateam.ru.forpda.api.IBaseForumPost in project ForPDA by RadiationX.
the class ThemeFragmentWeb method anchorDialog.
@JavascriptInterface
public void anchorDialog(String postId, String name) {
if (getContext() == null)
return;
runInUiThread(() -> {
IBaseForumPost post = getPostById(Integer.parseInt(postId));
String link = "https://4pda.ru/forum/index.php?act=findpost&pid=" + post.getId() + "&anchor=" + name;
new AlertDialog.Builder(getContext()).setTitle(R.string.link_to_anchor).setMessage(link).setPositiveButton(R.string.copy, (dialog, which) -> {
Utils.copyToClipBoard(link);
}).setNegativeButton(R.string.cancel, null).show();
});
}
use of forpdateam.ru.forpda.api.IBaseForumPost in project ForPDA by RadiationX.
the class ThemeFragmentWeb method copySpoilerLink.
@JavascriptInterface
public void copySpoilerLink(String postId, String spoilNumber) {
if (getContext() == null)
return;
runInUiThread(() -> {
new AlertDialog.Builder(getContext()).setMessage(R.string.spoiler_link_copy_ask).setPositiveButton(R.string.ok, (dialog, which) -> {
IBaseForumPost post = getPostById(Integer.parseInt(postId));
String s = "https://4pda.ru/forum/index.php?act=findpost&pid=" + post.getId() + "&anchor=Spoil-" + post.getId() + "-" + spoilNumber;
Utils.copyToClipBoard(s);
}).setNegativeButton(R.string.cancel, null).show();
});
}
Aggregations