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
928ed8dc
Commit
928ed8dc
authored
Jul 05, 2021
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复单选其他
parent
2dc5f8aa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
8 deletions
+27
-8
MultipleSelectedEvent.kt
m-im/src/main/java/com/yidianling/im/event/MultipleSelectedEvent.kt
+2
-1
MsgViewHolderLingxiWhichQuestion.java
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiWhichQuestion.java
+20
-6
YDLMessageFragment.java
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
+4
-0
InputPanel.java
m-im/src/main/java/com/yidianling/uikit/business/session/module/input/InputPanel.java
+1
-1
No files found.
m-im/src/main/java/com/yidianling/im/event/MultipleSelectedEvent.kt
View file @
928ed8dc
...
...
@@ -6,7 +6,8 @@ public class MultipleSelectedEvent (
val
strSelected
:
String
?,
var
othersState
:
OthersState
?,
var
multipleAnswerBean
:
MultipleAnswerBean
?,
var
isFromInputPanel
:
Boolean
var
isFromInputPanel
:
Boolean
,
var
recoverInput
:
Boolean
)
data class
OthersState
(
var
isOthers
:
Boolean
,
...
...
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiWhichQuestion.java
View file @
928ed8dc
...
...
@@ -193,7 +193,7 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
//请求接口发送所选题目,通过发通知到YDLMessageFragment统一回答问题。
EventBus
.
getDefault
().
post
(
new
MultipleSelectedEvent
(
null
,
null
,
new
MultipleAnswerBean
(
examId
,
questionPaperId
,
ImIn
.
INSTANCE
.
getUserInfo
().
getUid
(),
questionId
,
answersItems
,
message
.
getFromAccount
()),
false
));
questionId
,
answersItems
,
message
.
getFromAccount
()),
false
,
false
));
});
multiple_choice_title
.
setText
(
customAttachLingxiWhichQuestion
.
name
);
adapterLingxiMultipleChoice
=
new
AdapterLingxiMultipleChoice
();
...
...
@@ -229,21 +229,32 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
isClickable
=
true
;
questionList
.
get
(
i
).
setSelected
(
false
);
selectedStr
.
remove
(
questionList
.
get
(
i
).
getName
());
break
;
}
}
}
else
{
if
(
i
==
position
)
{
questionList
.
get
(
i
).
setSelected
(
true
);
selectedStr
.
add
(
questionList
.
get
(
i
).
getName
());
}
else
{
questionList
.
get
(
i
).
setSelected
(
false
);
if
(
questionList
.
get
(
i
).
getName
().
contains
(
"其他"
)){
selectedStr
.
remove
(
questionList
.
get
(
i
).
getName
());
}
}
}
questionList
.
get
(
i
).
setSelected
(
i
==
position
);
}
adapterLingxiWhichQuestion
.
setTagData
(
questionList
,
isSingleChoice
);
for
(
int
i
=
0
;
i
<
questionList
.
size
();
i
++)
{
if
(
questionList
.
get
(
i
).
isSelected
()){
answersItems
.
clear
();
answersItems
.
add
(
new
AnswersItem
(
questionList
.
get
(
position
).
getId
(),
questionList
.
get
(
position
).
getName
(),
""
,
questionList
.
get
(
position
).
getRelates
()));
break
;
}
}
answersItems
.
add
(
new
AnswersItem
(
questionList
.
get
(
position
).
getId
(),
questionList
.
get
(
position
).
getName
(),
""
,
questionList
.
get
(
position
).
getRelates
()));
stringBuffer
.
delete
(
2
,
stringBuffer
.
length
());
for
(
int
i
=
0
;
i
<
selectedStr
.
size
();
i
++)
{
stringBuffer
.
append
(
"#"
).
append
(
selectedStr
.
get
(
i
));
...
...
@@ -255,9 +266,12 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
answerLingxiQuestion
(
examId
,
questionPaperId
,
ImIn
.
INSTANCE
.
getUserInfo
().
getUid
().
toString
(),
questionId
,
answersItems
);
//更新本地消息
updateLocalMsg
(
position
,
null
);
//发通知取消隐藏输入框表情等符号
EventBus
.
getDefault
().
post
(
new
MultipleSelectedEvent
(
stringBuffer
.
toString
(),
new
OthersState
(
isOthers
,
questionList
.
get
(
position
).
isSelected
()),
new
MultipleAnswerBean
(
examId
,
questionPaperId
,
ImIn
.
INSTANCE
.
getUserInfo
().
getUid
(),
questionId
,
answersItems
,
message
.
getFromAccount
()),
false
,
true
));
}
else
{
EventBus
.
getDefault
().
post
(
new
MultipleSelectedEvent
(
stringBuffer
.
toString
(),
new
OthersState
(
isOthers
,
questionList
.
get
(
position
).
isSelected
()),
new
MultipleAnswerBean
(
examId
,
questionPaperId
,
ImIn
.
INSTANCE
.
getUserInfo
().
getUid
(),
questionId
,
answersItems
,
message
.
getFromAccount
()),
false
));
questionId
,
answersItems
,
message
.
getFromAccount
()),
false
,
false
));
}
}
}
...
...
@@ -325,7 +339,7 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
}
isOthers
=
questionList
.
get
(
position
).
getName
().
contains
(
"其他"
);
EventBus
.
getDefault
().
post
(
new
MultipleSelectedEvent
(
stringBuffer
.
toString
(),
new
OthersState
(
isOthers
,
questionList
.
get
(
position
).
isSelected
()),
new
MultipleAnswerBean
(
examId
,
questionPaperId
,
ImIn
.
INSTANCE
.
getUserInfo
().
getUid
(),
questionId
,
answersItems
,
message
.
getFromAccount
()),
false
));
questionId
,
answersItems
,
message
.
getFromAccount
()),
false
,
false
));
adapterLingxiMultipleChoice
.
setTagData
(
questionList
);
}
}
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
View file @
928ed8dc
...
...
@@ -1055,6 +1055,10 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
answersItems
=
event
.
getMultipleAnswerBean
().
getAnswersItems
();
multipleAnswerBean
=
event
.
getMultipleAnswerBean
();
multipleAnswerBean
.
setAnswersItems
(
answersItems
);
if
(
event
.
getRecoverInput
()){
inputPanel
.
onlyShowTextEnd
();
return
;
}
if
(
event
.
getOthersState
().
isOthers
()){
//用户点击了其他事件
if
(
event
.
getOthersState
().
getOthersSelect
()){
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/module/input/InputPanel.java
View file @
928ed8dc
...
...
@@ -418,7 +418,7 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
}
else
if
(
v
==
sendMessageButtonInInputBar
)
{
if
(
onlyShowInputTest
){
EventBus
.
getDefault
().
post
(
new
MultipleSelectedEvent
(
null
,
null
,
null
,
true
));
null
,
true
,
false
));
}
else
{
onTextMessageSendButtonPressed
();
}
...
...
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