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
95a9c853
Commit
95a9c853
authored
Jul 25, 2022
by
YKai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 代码优化,组件升级
parent
092150e0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
35 deletions
+8
-35
config.gradle
config.gradle
+2
-2
YDLP2PMessageActivity.java
m-im/src/main/java/com/yidianling/uikit/business/session/activity/YDLP2PMessageActivity.java
+5
-32
IP2PCustomActionHandler.java
m-im/src/main/java/com/yidianling/uikit/custom/bridge/IP2PCustomActionHandler.java
+1
-1
No files found.
config.gradle
View file @
95a9c853
...
...
@@ -10,7 +10,7 @@ ext {
"m-fm"
:
"0.0.30.03"
,
"m-user-medical"
:
"0.0.62.00"
,
"m-home"
:
"0.0.22.70"
,
"m-im-medical"
:
"0.0.21.
39
"
,
"m-im-medical"
:
"0.0.21.
41
"
,
"m-dynamic"
:
"0.0.7.28"
,
"m-article"
:
"0.0.0.10"
,
...
...
@@ -94,7 +94,7 @@ ext {
"m-fm"
:
"0.0.30.01"
,
"m-user-medical"
:
"0.0.62.00"
,
"m-home"
:
"0.0.22.70"
,
"m-im-medical"
:
"0.0.21.
39
"
,
"m-im-medical"
:
"0.0.21.
40
"
,
"m-dynamic"
:
"0.0.7.28"
,
"m-article"
:
"0.0.0.8"
,
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/activity/YDLP2PMessageActivity.java
View file @
95a9c853
...
...
@@ -39,8 +39,7 @@ import com.yidianling.uikit.custom.bridge.IP2PCustomActionHandler;
import
org.jetbrains.annotations.NotNull
;
import
java.util.List
;
import
static
com
.
yidianling
.
medical
.
extension
.
ImActionCountConstantsKt
.
YDL_MEDICAL_GET_CONSULTATION_PAGE
;
import
java.util.Objects
;
/**
...
...
@@ -51,11 +50,8 @@ import static com.yidianling.medical.extension.ImActionCountConstantsKt.YDL_MEDI
public
class
YDLP2PMessageActivity
extends
YDLBaseMessageActivity
{
private
boolean
isResume
=
false
;
private
int
screenWidth
;
private
int
screenHeight
;
protected
YDLMessageFragment
messageFragment
;
private
boolean
isChangeDoctor
=
false
;
String
oldName
=
""
;
private
final
int
MESSAGE_TYPE_END_INQUIRY
=
91
;
// 结束问诊
private
final
int
MESSAGE_TYPE_END_TALK
=
92
;
// 结束对话
...
...
@@ -118,11 +114,6 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
WindowManager
wm
=
(
WindowManager
)
this
.
getSystemService
(
Context
.
WINDOW_SERVICE
);
DisplayMetrics
displayMetrics
=
new
DisplayMetrics
();
wm
.
getDefaultDisplay
().
getMetrics
(
displayMetrics
);
screenWidth
=
displayMetrics
.
widthPixels
;
screenHeight
=
displayMetrics
.
heightPixels
;
if
(
ActionHandlerStorage
.
getL
(
sessionId
)
!=
null
)
{
ActionHandlerStorage
.
getL
(
sessionId
).
clear
(
sessionId
);
}
...
...
@@ -132,23 +123,9 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
registerObservers
(
true
);
NIMClient
.
getService
(
MsgService
.
class
).
clearUnreadCount
(
sessionId
,
SessionTypeEnum
.
P2P
);
// 转客服通知监听
ImObserversHelper
.
Companion
.
getInstance
().
setImCustomNotificationCallBack
(
new
IMRegisterObserverCustomNotificationCallBack
()
{
@Override
public
void
onObserverCustomNotification
(
@NotNull
String
fromUid
,
@NotNull
String
toUid
,
@NotNull
String
content
)
{
ServiceBean
serviceBean
=
new
Gson
().
fromJson
(
content
,
ServiceBean
.
class
);
// 切换到客服
if
(
serviceBean
!=
null
&&
serviceBean
.
getData
()
!=
null
&&
serviceBean
.
getBusiness
()
!=
null
&&
serviceBean
.
getBusiness
().
equals
(
"change_doctor"
))
{
isChangeDoctor
=
true
;
String
serviceUid
=
String
.
valueOf
(
serviceBean
.
getData
().
getToUid
());
tb
.
setTitle
(
serviceBean
.
getData
().
getName
());
YDLP2PMessageActivity
.
startChangeDoctor
(
YDLP2PMessageActivity
.
this
,
serviceUid
,
SessionHelper
.
getP2pCustomization
(-
1
),
null
,
new
P2PCustomActionHandlerImpl
(
serviceUid
,
serviceBean
.
getData
().
getName
(),
serviceUid
));
}
}
});
// 埋点
ActionCountUtils
.
Companion
.
baiDuCountSign2
(
ImActionCountConstantsKt
.
YDL_MEDICAL_MESSAGE_DETAIL_PAGE
,
"page_visit"
,
sessionId
,
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
name
);
ActionCountUtils
.
Companion
.
baiDuCountSign2
(
ImActionCountConstantsKt
.
YDL_MEDICAL_MESSAGE_DETAIL_PAGE
,
"page_visit"
,
sessionId
,
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
name
);
}
@Override
...
...
@@ -159,7 +136,6 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
registerObservers
(
false
);
super
.
onDestroy
();
AliYunRichLogsHelper
.
Companion
.
getInstance
().
sendRichLog
(
AliYunLogConfig
.
YUNXIN
,
"退出聊天页面"
);
}
@Override
...
...
@@ -200,12 +176,9 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
/**
* 用户信息观察者
*/
private
UserInfoObserver
userInfoObserver
=
new
UserInfoObserver
()
{
@Override
public
void
onUserInfoChanged
(
List
<
String
>
accounts
)
{
if
(
accounts
.
contains
(
sessionId
))
{
requestBuddyInfo
();
}
private
UserInfoObserver
userInfoObserver
=
accounts
->
{
if
(
accounts
.
contains
(
sessionId
))
{
requestBuddyInfo
();
}
};
...
...
m-im/src/main/java/com/yidianling/uikit/custom/bridge/IP2PCustomActionHandler.java
View file @
95a9c853
...
...
@@ -138,7 +138,7 @@ public interface IP2PCustomActionHandler {
class
DocInfo
{
public
String
toUid
;
public
String
doctorId
;
public
String
doctorId
=
""
;
public
String
listenerId
;
public
String
name
=
""
;
public
String
title
;
...
...
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