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
b4a89612
Commit
b4a89612
authored
Sep 10, 2020
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复redPoint接口,body
parent
482512f5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
40 deletions
+51
-40
SessionHelper.java
m-im/src/main/java/com/yidianling/im/session/SessionHelper.java
+3
-4
BuryRedPointParam.java
m-im/src/main/java/com/yidianling/im/ui/param/BuryRedPointParam.java
+19
-0
BuryRedPointsParm.kt
m-im/src/main/java/com/yidianling/im/ui/param/BuryRedPointsParm.kt
+0
-11
YDLMessageFragment.java
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
+29
-25
No files found.
m-im/src/main/java/com/yidianling/im/session/SessionHelper.java
View file @
b4a89612
...
...
@@ -97,12 +97,11 @@ import com.yidianling.im.session.viewholder.MsgViewHolderSticker;
import
com.yidianling.im.session.viewholder.MsgViewHolderSubscriptTime
;
import
com.yidianling.im.session.viewholder.MsgViewHolderSystemTips
;
import
com.yidianling.im.session.viewholder.MsgViewHolderTip
;
import
com.yidianling.im.ui.param.BuryRedPoint
sPar
m
;
import
com.yidianling.im.ui.param.BuryRedPoint
Para
m
;
import
com.yidianling.nimbase.api.model.session.SessionCustomization
;
import
com.yidianling.nimbase.api.model.session.SessionEventListener
;
import
com.yidianling.nimbase.business.session.actions.BaseAction
;
import
com.yidianling.nimbase.impl.cache.TeamDataCache
;
import
com.yidianling.user.api.bean.UserResponseBean
;
import
com.yidianling.uikit.api.NimUIKit
;
import
com.yidianling.uikit.business.session.actions.ImageAction
;
import
com.yidianling.uikit.business.session.actions.VideoAction
;
...
...
@@ -111,7 +110,7 @@ import com.yidianling.uikit.business.team.model.TeamExtras;
import
com.yidianling.uikit.business.team.model.TeamRequestCode
;
import
com.yidianling.uikit.custom.bridge.ActionHandlerStorage
;
import
com.yidianling.uikit.custom.bridge.IP2PCustomActionHandler
;
import
com.yidianling.user.api.bean.UserResponseBean
;
import
java.util.ArrayList
;
...
...
@@ -212,7 +211,7 @@ public class SessionHelper {
* 通知服务端红点
* */
private
static
void
notifyRedPoint
(
String
assistantUid
,
String
userId
)
{
String
str
=
new
Gson
().
toJson
(
new
BuryRedPointsPar
m
(
assistantUid
,
userId
));
String
str
=
new
Gson
().
toJson
(
new
BuryRedPointPara
m
(
assistantUid
,
userId
));
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
str
);
Disposable
subscribe
=
ImRetrofitApi
.
Companion
.
getImRetrofitApi
().
imBuryRedPoints
(
body
)
.
compose
(
RxUtils
.
INSTANCE
.
resultJavaData
())
...
...
m-im/src/main/java/com/yidianling/im/ui/param/BuryRedPointParam.java
0 → 100644
View file @
b4a89612
package
com
.
yidianling
.
im
.
ui
.
param
;
/**
* @author huozhiliang
* @描述:
* @Copyright Copyright (c) 2018
* @Company 壹点灵
* @date 2020/9/10
*/
public
class
BuryRedPointParam
{
public
String
assistantUid
;
public
String
userUid
;
public
BuryRedPointParam
(
String
assistantUid
,
String
userId
)
{
this
.
assistantUid
=
assistantUid
;
this
.
userUid
=
userId
;
}
}
m-im/src/main/java/com/yidianling/im/ui/param/BuryRedPointsParm.kt
deleted
100644 → 0
View file @
482512f5
package
com.yidianling.im.ui.param
/**
* @author huozhiliang
* @描述:
* @Copyright Copyright (c) 2018
* @Company 壹点灵
* @date 2020/9/8
*/
class
BuryRedPointsParm
(
assistantUid
:
String
,
userId
:
String
)
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
View file @
b4a89612
...
...
@@ -255,21 +255,21 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
fl_question_content
=
rootView
.
findViewById
(
R
.
id
.
fl_question_content
);
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
(
ActionHandlerStorage
.
getL
(
sessionId
).
getUserType
()
!=
2
)
{
if
(
null
!=
getActivity
()
&&
null
!=
rela_zixun
)
{
rela_zixun
.
setVisibility
(
View
.
GONE
);
}
}
if
(
ActionHandlerStorage
.
getL
(
sessionId
).
isNotPrepare
())
{
IMChatUtil
.
INSTANCE
.
prepareChatData
((
AppCompatActivity
)
getActivity
(),
sessionId
,
(
expertInfo
)
->
{
if
(
ActionHandlerStorage
.
getL
(
sessionId
).
isNotPrepare
())
{
IMChatUtil
.
INSTANCE
.
prepareChatData
((
AppCompatActivity
)
getActivity
(),
sessionId
,
(
expertInfo
)
->
{
String
toUid
=
expertInfo
.
shareData
.
toUid
;
IP2PCustomActionHandler
handler
=
ActionHandlerStorage
.
getL
(
sessionId
);
handler
.
setExpertInfo
(
toUid
,
expertInfo
);
handler
.
setExpertInfo
(
toUid
,
expertInfo
);
handler
.
setUserType
(
expertInfo
.
shareData
.
user_type
);
initView
();
});
}
else
{
}
else
{
initView
();
}
}
...
...
@@ -357,7 +357,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
initTopViewHeight
();
//设置顶部专家信息栏高度
addScrollListener
();
TitleBarBottom
titleBar
=
((
YDLBaseMessageActivity
)
getActivity
()).
getTitleBarBottom
();
IMChatUtil
.
INSTANCE
.
initChatOnlineState
(
titleBar
,
getContext
(),
sessionId
,
this
);
IMChatUtil
.
INSTANCE
.
initChatOnlineState
(
titleBar
,
getContext
(),
sessionId
,
this
);
}
if
(
ActionHandlerStorage
.
getL
(
sessionId
)
!=
null
)
{
...
...
@@ -480,19 +480,23 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
try
{
String
year
=
bean
.
getContent
();
userInfoDialogAge
=
Calendar
.
getInstance
().
get
(
Calendar
.
YEAR
)
-
Integer
.
valueOf
(
year
);
}
catch
(
Exception
e
)
{
}
}
catch
(
Exception
e
)
{
}
}
else
if
(
TextUtils
.
equals
(
bean
.
getUserInfoType
(),
"gener"
))
{
try
{
userInfoDialogSex
=
bean
.
getContent
();
}
catch
(
Exception
e
)
{
}
}
else
if
(
TextUtils
.
equals
(
bean
.
getUserInfoType
(),
"questionType"
))
{
}
catch
(
Exception
e
)
{
}
}
else
if
(
TextUtils
.
equals
(
bean
.
getUserInfoType
(),
"questionType"
))
{
try
{
userInfoDialogConsultType
=
bean
.
getContent
();
}
catch
(
Exception
e
)
{
}
}
else
if
(
TextUtils
.
equals
(
bean
.
getUserInfoType
(),
"questionContent"
))
{
}
catch
(
Exception
e
)
{
}
}
else
if
(
TextUtils
.
equals
(
bean
.
getUserInfoType
(),
"questionContent"
))
{
try
{
userInfoDialogQuestionDes
=
bean
.
getContent
();
}
catch
(
Exception
e
)
{
}
}
catch
(
Exception
e
)
{
}
}
}
getSourceFrom
();
...
...
@@ -582,11 +586,11 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
rl_contain
.
getViewTreeObserver
().
addOnGlobalLayoutListener
(
new
ViewTreeObserver
.
OnGlobalLayoutListener
()
{
@Override
public
void
onGlobalLayout
()
{
if
(
initHeightFinish
)
{
rvPaddingTop
+=
rl_contain
.
getHeight
();
messageListView
.
setPadding
(
0
,
rvPaddingTop
,
0
,
0
);
}
else
{
rvPaddingTop
+=
rl_contain
.
getHeight
();
if
(
initHeightFinish
)
{
rvPaddingTop
+=
rl_contain
.
getHeight
();
messageListView
.
setPadding
(
0
,
rvPaddingTop
,
0
,
0
);
}
else
{
rvPaddingTop
+=
rl_contain
.
getHeight
();
}
initHeightFinish
=
true
;
rl_contain
.
getViewTreeObserver
().
removeOnGlobalLayoutListener
(
this
);
...
...
@@ -596,19 +600,19 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
@Override
public
void
onGlobalLayout
()
{
expertInfoViewHeight
=
top_expert_info_ll
.
getHeight
();
if
(
messageListPanel
.
linearLayoutManager
.
findLastVisibleItemPosition
()==
0
)
{
if
(
messageListPanel
.
linearLayoutManager
.
findLastVisibleItemPosition
()
==
0
)
{
initHeightFinish
=
true
;
//如果页面未充满时,设置padding会出现覆盖问题,必须设置margin才可以
messageListView
.
setPadding
(
0
,
rvPaddingTop
,
0
,
0
);
messageListView
.
setPadding
(
0
,
rvPaddingTop
,
0
,
0
);
RelativeLayout
.
LayoutParams
layoutParams
=
(
RelativeLayout
.
LayoutParams
)
messageListView
.
getLayoutParams
();
layoutParams
.
topMargin
=
expertInfoViewHeight
;
messageListView
.
setLayoutParams
(
layoutParams
);
}
else
{
if
(
initHeightFinish
)
{
rvPaddingTop
+=
expertInfoViewHeight
;
messageListView
.
setPadding
(
0
,
rvPaddingTop
,
0
,
0
);
}
else
{
rvPaddingTop
+=
expertInfoViewHeight
;
if
(
initHeightFinish
)
{
rvPaddingTop
+=
expertInfoViewHeight
;
messageListView
.
setPadding
(
0
,
rvPaddingTop
,
0
,
0
);
}
else
{
rvPaddingTop
+=
expertInfoViewHeight
;
}
}
initHeightFinish
=
true
;
...
...
@@ -622,7 +626,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
@Override
public
void
onGlobalLayout
()
{
int
rvPaddingTop
=
ll_actions_yi
.
getHeight
();
messageListView
.
setPadding
(
0
,
rvPaddingTop
,
0
,
0
);
messageListView
.
setPadding
(
0
,
rvPaddingTop
,
0
,
0
);
rl_contain
.
getViewTreeObserver
().
removeOnGlobalLayoutListener
(
this
);
}
});
...
...
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