资讯文章超链接支持跳转到社区文章
This commit is contained in:
@ -261,7 +261,7 @@ public class MainActivity extends BaseActivity {
|
||||
if (isNewFirstLaunch) {
|
||||
// 延时两秒提交 APP 启动日志的,避免提交时还没获取到 GID
|
||||
AppExecutor.getUiExecutor().executeWithDelay(() -> {
|
||||
if(!this.isFinishing()) {
|
||||
if (!this.isFinishing()) {
|
||||
LogUtils.uploadDevice(DeviceTokenUtils.getLaunchType());
|
||||
}
|
||||
}, 2000L);
|
||||
|
||||
@ -310,6 +310,33 @@ public class NewsDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
|
||||
DirectUtils.directToAnswerDetail(mContext, id,
|
||||
StringUtils.buildString(mEntrance, "+(新闻详情[", mNewsDetailEntity.getTitle(), "])"), "文章链接");
|
||||
break;
|
||||
case "communities": // community_article
|
||||
// ghzhushou://communities/5a32405b2397ab000f688de3/articles/5c99d262c140b321564f04e3
|
||||
String communityId = "";
|
||||
String type = "";
|
||||
String typeId = "";
|
||||
String[] split = id.split("/");
|
||||
for (String text : split) {
|
||||
if (TextUtils.isEmpty(communityId)) {
|
||||
communityId = text;
|
||||
continue;
|
||||
}
|
||||
if (TextUtils.isEmpty(type)) {
|
||||
type = text;
|
||||
continue;
|
||||
}
|
||||
if (TextUtils.isEmpty(typeId)) {
|
||||
typeId = text;
|
||||
}
|
||||
}
|
||||
if ("articles".equals(type)) {
|
||||
CommunityEntity communityEntity = new CommunityEntity();
|
||||
communityEntity.setId(communityId);
|
||||
DirectUtils.directToCommunityArticle(
|
||||
mContext, typeId, communityId,
|
||||
StringUtils.buildString(mEntrance, "+(新闻详情[", mNewsDetailEntity.getTitle(), "])"));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
DialogUtils.showLowVersionDialog(mContext);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user