|
@@ -263,7 +263,7 @@ public class ExpandTextView extends androidx.appcompat.widget.AppCompatTextView
|
|
|
needAppend = true;
|
|
|
}
|
|
|
}
|
|
|
- if (workingText.contains("https://g.cricdit.com/") || workingText.contains("https://u.cricdit.com/")) {
|
|
|
+ if (workingText.contains("https://t.me/")) {
|
|
|
final SpannableStringBuilder style = new SpannableStringBuilder();
|
|
|
|
|
|
//设置文字
|
|
@@ -283,21 +283,29 @@ public class ExpandTextView extends androidx.appcompat.widget.AppCompatTextView
|
|
|
} else {
|
|
|
gName = finalWorkingText.substring(index + "https://t.me/".length());
|
|
|
}
|
|
|
- new CommentPresenter().groupLinkInfo(gName, new BaseObserver<GroupInfoBean>() {
|
|
|
- @Override
|
|
|
- protected void onSuccess(GroupInfoBean data) {
|
|
|
-// ARouter.getInstance().build(ARouterPath.PATH_CHAT_CHAT_ACTIVITY).withString(Constant.K_GROUP_ID, data.getGroup_id()).withString(Constant.K_GROUP_NAME, data.getGroup_name())
|
|
|
-// .withString(Constant.K_GROUP_AVATAR, data.getGroup_image())
|
|
|
-// .navigation();
|
|
|
- //跳转到群组聊天界面
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onError(Throwable e) {
|
|
|
- super.onError(e);
|
|
|
- }
|
|
|
- });
|
|
|
+
|
|
|
+ //跳转到群组聊天界面 todo 这里需要样子跳转到聊天界面是否正确 这里需要看电报的源码 根据gName信息获取个人信息(user_id) 跳转到聊天界面
|
|
|
+ String user_id = "0";
|
|
|
+ Bundle args = new Bundle();
|
|
|
+ args.putLong("user_id", Long.parseLong(user_id));
|
|
|
+ baseFragment.presentFragment(new ProfileActivity(args));
|
|
|
+// new CommentPresenter().groupLinkInfo(gName, new BaseObserver<GroupInfoBean>() {
|
|
|
+// @Override
|
|
|
+// protected void onSuccess(GroupInfoBean data) {
|
|
|
+//// ARouter.getInstance().build(ARouterPath.PATH_CHAT_CHAT_ACTIVITY).withString(Constant.K_GROUP_ID, data.getGroup_id()).withString(Constant.K_GROUP_NAME, data.getGroup_name())
|
|
|
+//// .withString(Constant.K_GROUP_AVATAR, data.getGroup_image())
|
|
|
+//// .navigation();
|
|
|
+// //跳转到群组聊天界面
|
|
|
+// Bundle args = new Bundle();
|
|
|
+// args.putLong("user_id", Long.parseLong(userId));
|
|
|
+// baseFragment.presentFragment(new ProfileActivity(args));
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void onError(Throwable e) {
|
|
|
+// super.onError(e);
|
|
|
+// }
|
|
|
+// });
|
|
|
}
|
|
|
// else if (finalWorkingText.contains("https://t.me/")) {
|
|
|
// int index = finalWorkingText.indexOf("https://t.me/");
|