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
78b46c65
Commit
78b46c65
authored
Jul 08, 2021
by
刘鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/4.2.60' into 4.2.60
# Conflicts: # config.gradle
parents
36b12cf9
73d2635b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
54 additions
and
72 deletions
+54
-72
config.gradle
config.gradle
+2
-2
CustomAttachLingxiAnswerQuestion.java
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachLingxiAnswerQuestion.java
+4
-0
MsgViewHolderLingxiAnswerQuestion.java
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiAnswerQuestion.java
+23
-4
MsgViewHolderLingxiWhichQuestion.java
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiWhichQuestion.java
+0
-0
YDLMessageFragment.java
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
+2
-5
MessageListPanelEx.java
m-im/src/main/java/com/yidianling/uikit/business/session/module/list/MessageListPanelEx.java
+2
-2
MsgViewHolderBase.java
m-im/src/main/java/com/yidianling/uikit/business/session/viewholder/MsgViewHolderBase.java
+5
-5
MsgViewHolderText.java
m-im/src/main/java/com/yidianling/uikit/business/session/viewholder/MsgViewHolderText.java
+2
-0
im_nim_lingxi_multiple_choice.xml
m-im/src/main/res/layout/im_nim_lingxi_multiple_choice.xml
+2
-0
im_nim_lingxi_which_question.xml
m-im/src/main/res/layout/im_nim_lingxi_which_question.xml
+0
-41
im_nim_read_recipt_layout.xml
m-im/src/main/res_uikit/layout/im_nim_read_recipt_layout.xml
+12
-13
No files found.
config.gradle
View file @
78b46c65
...
...
@@ -10,7 +10,7 @@ ext {
"m-fm"
:
"0.0.30.03"
,
"m-user"
:
"0.0.61.37"
,
"m-home"
:
"0.0.22.67"
,
"m-im"
:
"0.0.19.3
7
"
,
"m-im"
:
"0.0.19.3
9
"
,
"m-dynamic"
:
"0.0.7.24"
,
"m-article"
:
"0.0.0.10"
,
...
...
@@ -93,7 +93,7 @@ ext {
"m-fm"
:
"0.0.30.01"
,
"m-user"
:
"0.0.61.37"
,
"m-home"
:
"0.0.22.67"
,
"m-im"
:
"0.0.19.3
6
"
,
"m-im"
:
"0.0.19.3
9
"
,
"m-dynamic"
:
"0.0.7.24"
,
"m-article"
:
"0.0.0.8"
,
...
...
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachLingxiAnswerQuestion.java
View file @
78b46c65
...
...
@@ -9,10 +9,12 @@ import java.util.ArrayList;
public
class
CustomAttachLingxiAnswerQuestion
extends
CustomAttachment
{
private
final
String
ANSWERS
=
"answers"
;
private
final
String
QUESTIONID
=
"questionId"
;
private
final
String
EXAMID
=
"examId"
;
public
ArrayList
<
QuestionItemBean
>
answers
;
public
String
questionId
;
public
String
examId
;
public
CustomAttachLingxiAnswerQuestion
()
{
super
(
CustomAttachmentType
.
TYPE_LINGXI_ANSWER_QUESTION
);
...
...
@@ -21,6 +23,7 @@ public class CustomAttachLingxiAnswerQuestion extends CustomAttachment{
protected
void
parseData
(
JSONObject
data
)
{
this
.
answers
=(
ArrayList
<
QuestionItemBean
>)
JSON
.
parseArray
(
data
.
getString
(
ANSWERS
),
QuestionItemBean
.
class
);
this
.
questionId
=
data
.
getString
(
QUESTIONID
);
this
.
examId
=
data
.
getString
(
EXAMID
);
}
@Override
...
...
@@ -28,6 +31,7 @@ public class CustomAttachLingxiAnswerQuestion extends CustomAttachment{
JSONObject
data
=
new
JSONObject
();
data
.
put
(
ANSWERS
,
answers
);
data
.
put
(
QUESTIONID
,
questionId
);
data
.
put
(
EXAMID
,
examId
);
return
data
;
}
}
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiAnswerQuestion.java
View file @
78b46c65
package
com
.
yidianling
.
im
.
session
.
viewholder
;
import
android.view.View
;
import
android.widget.TextView
;
import
com.yidianling.im.R
;
...
...
@@ -16,6 +17,7 @@ public class MsgViewHolderLingxiAnswerQuestion extends MsgViewHolderBase {
CustomAttachLingxiAnswerQuestion
customattachLingxiAnswerQuestion
;
private
ArrayList
<
QuestionItemBean
>
itemBeans
;
private
StringBuffer
sb
;
private
boolean
isContainsOther
=
false
;
public
MsgViewHolderLingxiAnswerQuestion
(
BaseMultiItemFetchLoadAdapter
adapter
)
{
super
(
adapter
);
}
...
...
@@ -39,21 +41,38 @@ public class MsgViewHolderLingxiAnswerQuestion extends MsgViewHolderBase {
@Override
protected
void
bindContentView
()
{
avatarLeft
.
setVisibility
(
View
.
INVISIBLE
);
customattachLingxiAnswerQuestion
=
((
CustomAttachLingxiAnswerQuestion
)
message
.
getAttachment
());
itemBeans
=
customattachLingxiAnswerQuestion
.
answers
;
sb
=
new
StringBuffer
();
for
(
int
j
=
0
;
j
<
itemBeans
.
size
();
j
++){
if
(
itemBeans
.
get
(
j
).
getOther
().
trim
().
length
()>
0
){
isContainsOther
=
true
;
break
;
}
}
for
(
int
i
=
0
;
i
<
itemBeans
.
size
();
i
++){
if
(
i
==(
itemBeans
.
size
()-
1
)&&
itemBeans
.
get
(
i
).
getName
().
contains
(
"其他"
)){
sb
.
append
(
"#"
+
itemBeans
.
get
(
i
).
getName
()+
"\r\n "
).
append
(
itemBeans
.
get
(
i
).
getOther
());
if
(
itemBeans
.
get
(
i
).
getOther
().
trim
().
length
()>
0
){
//如果其他有内容就换行
sb
.
append
(
"#"
+
itemBeans
.
get
(
i
).
getName
()+
"\r\n "
).
append
(
itemBeans
.
get
(
i
).
getOther
());
}
else
{
sb
.
append
(
"、"
+
itemBeans
.
get
(
i
).
getName
());
}
}
else
{
sb
.
append
(
"#"
+
itemBeans
.
get
(
i
).
getName
()+
" "
);
if
(
isContainsOther
){
sb
.
append
(
"#"
+
itemBeans
.
get
(
i
).
getName
()+
" "
);
}
else
{
sb
.
append
(
"、"
+
itemBeans
.
get
(
i
).
getName
()+
" "
);
}
}
}
if
(
itemBeans
.
size
()==
1
&&!
itemBeans
.
get
(
0
).
getName
().
contains
(
"其他"
)){
answer_question
.
setText
(
itemBeans
.
get
(
0
).
getName
());
}
else
{
if
(!
isContainsOther
){
sb
.
replace
(
0
,
1
,
""
);
}
answer_question
.
setText
(
sb
.
toString
());
}
}
...
...
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiWhichQuestion.java
View file @
78b46c65
This diff is collapsed.
Click to expand it.
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
View file @
78b46c65
...
...
@@ -66,8 +66,6 @@ import com.yidianling.im.event.MultipleSelectedEvent;
import
com.yidianling.im.helper.IMChatUtil
;
import
com.yidianling.im.http.ImRetrofitApi
;
import
com.yidianling.im.router.ImIn
;
import
com.yidianling.im.session.extension.CustomAttachLingxiAnswerQuestion
;
import
com.yidianling.im.session.extension.CustomAttachmentConfirmOrder
;
import
com.yidianling.im.session.viewholder.bean.AnswerBean
;
import
com.yidianling.im.session.viewholder.bean.AnswersItem
;
import
com.yidianling.im.session.viewholder.bean.LingxiAnswerBean
;
...
...
@@ -1074,12 +1072,13 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
},
500
);
}
else
{
//其他是未选中状态
question_multiple
.
setVisibility
(
View
.
GONE
);
isOthers
=
event
.
getOthersState
().
getOthersSelect
();
inputPanel
.
onlyShowTextEnd
();
}
if
(
event
.
getStrSelected
().
contains
(
"其他"
)){
question_multiple
.
setVisibility
(
View
.
VISIBLE
);
question_multiple
.
setText
(
event
.
getStrSelected
());
question_multiple
.
setText
(
event
.
getStrSelected
()
.
replace
(
"、"
,
"#"
)
);
}
}
else
{
if
(
event
.
getStrSelected
().
contains
(
"其他"
)){
...
...
@@ -1135,8 +1134,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
}
message
.
setLocalExtension
(
map
);
NIMClient
.
getService
(
MsgService
.
class
).
updateIMMessage
(
message
);
//通知ui刷新
// message.getMsgAdapter().updateItemAtLocalExtension(message);
}
/*
* 用户回答问题接口
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/module/list/MessageListPanelEx.java
View file @
78b46c65
...
...
@@ -271,7 +271,6 @@ public class MessageListPanelEx {
private
void
doScrollToBottom
()
{
messageListView
.
scrollToPosition
(
adapter
.
getBottomDataPosition
());
}
public
void
onIncomingMessage
(
List
<
IMMessage
>
messages
)
{
boolean
needScrollToBottom
=
isLastMessageVisible
();
boolean
needRefresh
=
false
;
...
...
@@ -299,9 +298,10 @@ public class MessageListPanelEx {
IMMessage
lastMsg
=
messages
.
get
(
messages
.
size
()
-
1
);
if
(
isMyMessage
(
lastMsg
))
{
if
(
needScrollToBottom
)
{
doScrollToBottom
(
);
messageListView
.
smoothScrollToPosition
(
adapter
.
getBottomDataPosition
()
);
}
else
if
(
incomingMsgPrompt
!=
null
&&
lastMsg
.
getSessionType
()
!=
SessionTypeEnum
.
ChatRoom
)
{
incomingMsgPrompt
.
show
(
lastMsg
);
messageListView
.
smoothScrollToPosition
(
adapter
.
getBottomDataPosition
());
}
}
}
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/viewholder/MsgViewHolderBase.java
View file @
78b46c65
...
...
@@ -58,8 +58,8 @@ public abstract class MsgViewHolderBase extends RecyclerViewHolder<BaseMultiItem
protected
TextView
readReceiptTextView
;
protected
TextView
ackMsgTextView
;
p
rivate
HeadImageView
avatarLeft
;
p
rivate
HeadImageView
avatarRight
;
p
ublic
HeadImageView
avatarLeft
;
p
ublic
HeadImageView
avatarRight
;
public
ImageView
nameIconView
;
...
...
@@ -424,11 +424,11 @@ public abstract class MsgViewHolderBase extends RecyclerViewHolder<BaseMultiItem
}
}
public
void
setAvatarLeftInVisibity
(){
public
void
setAvatarLeftInVisibity
()
{
avatarLeft
.
setVisibility
(
View
.
INVISIBLE
);
}
public
void
setAvatarRightInVisibity
(){
public
void
setAvatarRightInVisibity
()
{
avatarRight
.
setVisibility
(
View
.
INVISIBLE
);
}
...
...
@@ -448,7 +448,7 @@ public abstract class MsgViewHolderBase extends RecyclerViewHolder<BaseMultiItem
if
(
isReceivedMessage
())
{
audioRightSmallTip
.
setVisibility
(
View
.
VISIBLE
);
audioLeftSmallTip
.
setVisibility
(
View
.
GONE
);
}
else
{
}
else
{
audioRightSmallTip
.
setVisibility
(
View
.
GONE
);
audioLeftSmallTip
.
setVisibility
(
View
.
VISIBLE
);
}
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/viewholder/MsgViewHolderText.java
View file @
78b46c65
...
...
@@ -51,9 +51,11 @@ public class MsgViewHolderText extends MsgViewHolderBase {
private
void
layoutDirection
()
{
if
(
isReceivedMessage
())
{
bodyTextView
.
setTextColor
(
context
.
getResources
().
getColor
(
R
.
color
.
im_color_242424
));
bodyTextView
.
setBackgroundResource
(
NimUIKitImpl
.
getOptions
().
messageLeftBackground
);
bodyTextView
.
setPadding
(
ScreenUtil
.
dip2px
(
13
),
ScreenUtil
.
dip2px
(
7
),
ScreenUtil
.
dip2px
(
13
),
ScreenUtil
.
dip2px
(
7
));
}
else
{
bodyTextView
.
setTextColor
(
context
.
getResources
().
getColor
(
R
.
color
.
white
));
bodyTextView
.
setBackgroundResource
(
NimUIKitImpl
.
getOptions
().
messageRightBackground
);
bodyTextView
.
setPadding
(
ScreenUtil
.
dip2px
(
13
),
ScreenUtil
.
dip2px
(
7
),
ScreenUtil
.
dip2px
(
13
),
ScreenUtil
.
dip2px
(
7
));
}
...
...
m-im/src/main/res/layout/im_nim_lingxi_multiple_choice.xml
View file @
78b46c65
...
...
@@ -18,6 +18,8 @@
app:layout_constraintLeft_toLeftOf=
"parent"
tools:text=
"请问是发生了什么事情导致的呢?(多选)?"
android:textSize=
"@dimen/im_text_size_17"
android:includeFontPadding=
"false"
android:lineSpacingExtra=
"3dip"
android:textColor=
"@color/im_color_242424"
android:paddingBottom=
"@dimen/platform_dp_16"
>
...
...
m-im/src/main/res/layout/im_nim_lingxi_which_question.xml
deleted
100644 → 0
View file @
36b12cf9
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/im_custom_message_round_white_6dp_bg"
android:paddingLeft=
"@dimen/platform_dp_12"
android:paddingRight=
"@dimen/platform_dp_3"
android:paddingTop=
"@dimen/platform_dp_12"
>
<TextView
android:id=
"@+id/which_question_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxWidth=
"263dp"
android:textColor=
"@color/im_color_242424"
android:textSize=
"@dimen/im_text_size_17"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
tools:text=
"您想要咨询下类哪类问?"
android:layout_marginBottom=
"@dimen/platform_dp_16"
app:layout_constraintBottom_toTopOf=
"@id/which_question_rv"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/which_question_rv"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/dp_4"
android:orientation=
"vertical"
app:layoutManager=
"androidx.recyclerview.widget.GridLayoutManager"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"@id/which_question_title"
app:layout_constraintTop_toBottomOf=
"@id/which_question_title"
app:spanCount=
"2"
tools:itemCount=
"6"
tools:listitem=
"@layout/im_lingxi_which_question_item"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
m-im/src/main/res_uikit/layout/im_nim_read_recipt_layout.xml
View file @
78b46c65
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/textViewAlreadyRead"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_marginBottom=
"3dip"
android:background=
"@color/im_transparent"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/textViewAlreadyRead"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_marginLeft=
"2dp"
android:layout_marginRight=
"2dp"
android:text=
"@string/im_readed"
android:textColor=
"#666666"
android:textSize=
"12sp"
android:visibility=
"gone"
tools:visibility=
"visible"
/>
android:layout_marginBottom=
"3dip"
android:background=
"@color/im_transparent"
android:text=
"@string/im_readed"
android:textColor=
"#999999"
android:textSize=
"12sp"
android:visibility=
"gone"
tools:visibility=
"visible"
/>
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