Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
f2ad85f9
Commit
f2ad85f9
authored
Apr 02, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:todo
parent
6e10f899
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
22 deletions
+31
-22
NewMultiMessageFragment.kt
m-im/src/main/java/com/yidianling/im/ui/page/NewMultiMessageFragment.kt
+11
-8
YDLTeamMessageActivity.java
m-im/src/main/java/com/yidianling/uikit/business/session/activity/YDLTeamMessageActivity.java
+1
-1
YDLMessageFragment.java
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
+3
-2
YDLTeamMessageFragment.java
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLTeamMessageFragment.java
+2
-0
TeamCreateHelper.java
m-im/src/main/java/com/yidianling/uikit/business/team/helper/TeamCreateHelper.java
+14
-11
No files found.
m-im/src/main/java/com/yidianling/im/ui/page/NewMultiMessageFragment.kt
View file @
f2ad85f9
...
...
@@ -41,6 +41,7 @@ import com.yidianling.im.ui.page.fragment.bean.UnreadMessageBean
import
com.yidianling.im.ui.page.popupWindow.ChatSettingPopupWindow
import
com.yidianling.im.ui.param.ClearMessageParam
import
com.yidianling.im.ui.param.UnreadParam
import
com.yidianling.uikit.api.NimUIKit
import
de.greenrobot.event.EventBus
import
io.reactivex.Observable
import
io.reactivex.android.schedulers.AndroidSchedulers
...
...
@@ -346,14 +347,16 @@ class NewMultiMessageFragment : BaseFragment() {
*/
private
fun
initKefu
()
{
ll_kefu
.
setOnClickListener
{
ActionCountUtils
.
count
(
"ydl_user_message_page|ydl_user_message_xiaoyi_click"
)
if
(
ImIn
.
isLogin
())
{
SessionHelper
.
startP2PSession
(
context
,
-
1
,
ImConstants
.
KEFUXIAOYI
,
null
,
P2PCustomActionHandlerImpl
(
ImConstants
.
KEFUXIAOYI
,
"客服小壹"
,
ImConstants
.
KEFUXIAOYI
)
)
}
else
{
ToastUtil
.
toastShort
(
"请登录后再试"
)
}
// ActionCountUtils.count("ydl_user_message_page|ydl_user_message_xiaoyi_click")
// if (ImIn.isLogin()) {
// SessionHelper.startP2PSession(context, -1, ImConstants.KEFUXIAOYI, null,
// P2PCustomActionHandlerImpl(ImConstants.KEFUXIAOYI, "客服小壹", ImConstants.KEFUXIAOYI)
// )
// } else {
// ToastUtil.toastShort("请登录后再试")
// }
// NimUIKit.startYDLChatting(context,"4597318766",SessionTypeEnum.Team,null,null,null)
SessionHelper
.
startTeamSession
(
context
,
"4597318766"
)
}
}
/**
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/activity/YDLTeamMessageActivity.java
View file @
f2ad85f9
...
...
@@ -300,7 +300,7 @@ public class YDLTeamMessageActivity extends YDLBaseMessageActivity {
};
@Override
protected
YDLMessageFragment
fragment
()
{
protected
YDL
Team
MessageFragment
fragment
()
{
// 添加fragment
Bundle
arguments
=
getIntent
().
getExtras
();
arguments
.
putSerializable
(
Extras
.
EXTRA_TYPE
,
SessionTypeEnum
.
Team
);
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
View file @
f2ad85f9
...
...
@@ -280,13 +280,14 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
question_multiple
=
rootView
.
findViewById
(
R
.
id
.
question_multiple
);
//做灵犀2.0 去掉常用语逻辑
//rl_common_question_enter.setVisibility(ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getUserType() == 3 ? View.VISIBLE : View.GONE);
if
(
ActionHandlerStorage
.
getL
(
sessionId
).
getUserType
()
!=
2
)
{
if
(
null
!=
ActionHandlerStorage
.
getL
(
sessionId
)&&
ActionHandlerStorage
.
getL
(
sessionId
).
getUserType
()
!=
2
)
{
if
(
null
!=
getActivity
()
&&
null
!=
rela_zixun
)
{
rela_zixun
.
setVisibility
(
View
.
GONE
);
}
}
if
(
ActionHandlerStorage
.
getL
(
sessionId
).
isNotPrepare
())
{
if
(
null
!=
ActionHandlerStorage
.
getL
(
sessionId
)&&
ActionHandlerStorage
.
getL
(
sessionId
).
isNotPrepare
())
{
IMChatUtil
.
INSTANCE
.
prepareChatData
((
AppCompatActivity
)
getActivity
(),
sessionId
,
(
expertInfo
)
->
{
String
toUid
=
expertInfo
.
shareData
.
toUid
;
IP2PCustomActionHandler
handler
=
ActionHandlerStorage
.
getL
(
sessionId
);
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLTeamMessageFragment.java
View file @
f2ad85f9
...
...
@@ -54,4 +54,5 @@ public class YDLTeamMessageFragment extends YDLMessageFragment {
this
.
team
=
team
;
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/business/team/helper/TeamCreateHelper.java
View file @
f2ad85f9
...
...
@@ -18,6 +18,8 @@ import com.netease.nimlib.sdk.team.constant.TeamFieldEnum;
import
com.netease.nimlib.sdk.team.constant.TeamTypeEnum
;
import
com.netease.nimlib.sdk.team.model.CreateTeamResult
;
import
com.netease.nimlib.sdk.team.model.Team
;
import
com.yidianling.common.tools.LogUtil
;
import
com.yidianling.common.tools.ToastUtil
;
import
com.yidianling.im.R
;
import
com.yidianling.im.session.SessionHelper
;
import
com.yidianling.nimbase.common.ToastHelper
;
...
...
@@ -58,11 +60,12 @@ public class TeamCreateHelper {
if
(
failedAccounts
!=
null
&&
!
failedAccounts
.
isEmpty
())
{
TeamHelper
.
onMemberTeamNumOverrun
(
failedAccounts
,
context
);
}
else
{
Toast
Helper
.
showToast
(
DemoCache
.
getContext
(),
com
.
netease
.
nim
.
uikit
.
R
.
string
.
create_team_success
);
Toast
Util
.
toastShort
(
"创建群聊成功"
);
}
if
(
isNeedBack
)
{
SessionHelper
.
startTeamSession
(
context
,
result
.
getTeam
().
getId
(),
MainActivity
.
class
,
null
);
// 进入创建的群
// SessionHelper.startTeamSession(context, result.getTeam().getId(), MainActivity.class, null); // 进入创建的群
LogUtil
.
e
(
"进入创建的群:"
+
result
.
getTeam
().
getId
());
}
else
{
SessionHelper
.
startTeamSession
(
context
,
result
.
getTeam
().
getId
());
}
...
...
@@ -75,10 +78,11 @@ public class TeamCreateHelper {
public
void
onFailed
(
int
code
)
{
DialogMaker
.
dismissProgressDialog
();
if
(
code
==
ResponseCode
.
RES_TEAM_ECOUNT_LIMIT
)
{
String
tip
=
context
.
getString
(
com
.
netease
.
nim
.
uikit
.
R
.
string
.
over_team_member_capacity
,
DEFAULT_TEAM_CAPACITY
);
ToastHelper
.
showToast
(
DemoCache
.
getContext
(),
tip
);
ToastUtil
.
toastShort
(
"已达到人数限制"
);
}
else
{
ToastHelper
.
showToast
(
DemoCache
.
getContext
(),
com
.
netease
.
nim
.
uikit
.
R
.
string
.
create_team_failed
);
ToastUtil
.
toastShort
(
"创建群聊失败:code="
+
code
);
}
Log
.
e
(
TAG
,
"create team error: "
+
code
);
...
...
@@ -99,7 +103,7 @@ public class TeamCreateHelper {
String
teamName
=
"高级群"
;
DialogMaker
.
showProgressDialog
(
context
,
context
.
getString
(
com
.
netease
.
nim
.
uikit
.
R
.
string
.
empty
),
true
);
ToastUtil
.
toastShort
(
"创建中。。。。"
);
// 创建群
TeamTypeEnum
type
=
TeamTypeEnum
.
Advanced
;
HashMap
<
TeamFieldEnum
,
Serializable
>
fields
=
new
HashMap
<>();
...
...
@@ -118,12 +122,11 @@ public class TeamCreateHelper {
DialogMaker
.
dismissProgressDialog
();
String
tip
;
if
(
code
==
ResponseCode
.
RES_TEAM_ECOUNT_LIMIT
)
{
tip
=
context
.
getString
(
com
.
netease
.
nim
.
uikit
.
R
.
string
.
over_team_member_capacity
,
DEFAULT_TEAM_CAPACITY
);
tip
=
"邀请失败成员人数上限为200人"
;
}
else
if
(
code
==
ResponseCode
.
RES_TEAM_LIMIT
)
{
tip
=
context
.
getString
(
com
.
netease
.
nim
.
uikit
.
R
.
string
.
over_team_capacity
)
;
tip
=
"创建失败,创建群数量达到限制"
;
}
else
{
tip
=
context
.
getString
(
com
.
netease
.
nim
.
uikit
.
R
.
string
.
create_team_failed
)
+
", code="
+
code
;
tip
=
"创建失败code:"
+
code
;
}
ToastHelper
.
showToast
(
context
,
tip
);
...
...
@@ -161,7 +164,7 @@ public class TeamCreateHelper {
if
(
failedAccounts
!=
null
&&
!
failedAccounts
.
isEmpty
())
{
TeamHelper
.
onMemberTeamNumOverrun
(
failedAccounts
,
context
);
}
else
{
Toast
Helper
.
showToast
(
DemoCache
.
getContext
(),
com
.
netease
.
nim
.
uikit
.
R
.
string
.
create_team_success
);
Toast
Util
.
toastShort
(
"创建高级群成功"
);
}
// 演示:向群里插入一条Tip消息,使得该群能立即出现在最近联系人列表(会话列表)中,满足部分开发者需求
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment