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
31508559
Commit
31508559
authored
Dec 02, 2020
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:m-im 修复私聊列表--通知--预约提醒列表--已读红点并未消失功能
parent
12b79209
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
DemoGlobalConfig.java
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
+2
-2
MsgListAdapter.java
m-im/src/main/java/com/yidianling/im/ui/adapter/MsgListAdapter.java
+11
-6
No files found.
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
View file @
31508559
...
@@ -20,8 +20,8 @@ import java.util.List;
...
@@ -20,8 +20,8 @@ import java.util.List;
public
final
class
DemoGlobalConfig
implements
IConfigModule
{
public
final
class
DemoGlobalConfig
implements
IConfigModule
{
String
APP_DOMAIN
=
"https://api.github.com/"
;
String
APP_DOMAIN
=
"https://api.github.com/"
;
// public static String appEnv = YDLConstants.ENV_AUTO_TEST;
// public static String appEnv = YDLConstants.ENV_AUTO_TEST;
public
static
String
appEnv
=
YDLConstants
.
ENV_TEST
;
//
public static String appEnv = YDLConstants.ENV_TEST;
//
public static String appEnv = YDLConstants.ENV_PROD;
public
static
String
appEnv
=
YDLConstants
.
ENV_PROD
;
@Override
@Override
public
void
injectAppLifecycle
(
@NotNull
Context
context
,
@NotNull
List
<
IAppLifecycles
>
lifecycles
)
{
public
void
injectAppLifecycle
(
@NotNull
Context
context
,
@NotNull
List
<
IAppLifecycles
>
lifecycles
)
{
...
...
m-im/src/main/java/com/yidianling/im/ui/adapter/MsgListAdapter.java
View file @
31508559
...
@@ -13,6 +13,7 @@ import com.ydl.ydlcommon.base.BaseActivity;
...
@@ -13,6 +13,7 @@ import com.ydl.ydlcommon.base.BaseActivity;
import
com.ydl.ydlcommon.base.lifecycle.ILifecycleable
;
import
com.ydl.ydlcommon.base.lifecycle.ILifecycleable
;
import
com.ydl.ydlcommon.data.http.RxUtils
;
import
com.ydl.ydlcommon.data.http.RxUtils
;
import
com.ydl.ydlcommon.data.http.ThrowableConsumer
;
import
com.ydl.ydlcommon.data.http.ThrowableConsumer
;
import
com.ydl.ydlcommon.utils.LogUtil
;
import
com.ydl.ydlcommon.utils.StringUtils
;
import
com.ydl.ydlcommon.utils.StringUtils
;
import
com.ydl.ydlcommon.utils.remind.ToastHelper
;
import
com.ydl.ydlcommon.utils.remind.ToastHelper
;
import
com.yidianling.im.bean.MsgData
;
import
com.yidianling.im.bean.MsgData
;
...
@@ -29,7 +30,9 @@ import org.jetbrains.annotations.NotNull;
...
@@ -29,7 +30,9 @@ import org.jetbrains.annotations.NotNull;
import
java.util.Map
;
import
java.util.Map
;
import
de.greenrobot.event.EventBus
;
import
de.greenrobot.event.EventBus
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.disposables.Disposable
;
import
io.reactivex.disposables.Disposable
;
import
io.reactivex.schedulers.Schedulers
;
/**
/**
* 消息adapter
* 消息adapter
...
@@ -60,9 +63,7 @@ public class MsgListAdapter extends CommonAdapter<MsgData> {
...
@@ -60,9 +63,7 @@ public class MsgListAdapter extends CommonAdapter<MsgData> {
convertView
=
new
MsgListItemView
(
context
,
type
);
convertView
=
new
MsgListItemView
(
context
,
type
);
}
}
((
MsgListItemView
)
convertView
).
setData
(
mDataList
.
get
(
position
));
((
MsgListItemView
)
convertView
).
setData
(
mDataList
.
get
(
position
));
convertView
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
convertView
.
setOnClickListener
(
v
->
{
@Override
public
void
onClick
(
View
v
)
{
//动态消息暂时不需要访问以下接口
//动态消息暂时不需要访问以下接口
boolean
fla
=
false
;
boolean
fla
=
false
;
//判断是否是跳转专家主页
//判断是否是跳转专家主页
...
@@ -113,8 +114,10 @@ public class MsgListAdapter extends CommonAdapter<MsgData> {
...
@@ -113,8 +114,10 @@ public class MsgListAdapter extends CommonAdapter<MsgData> {
if
(
fla
||
boo
)
{
if
(
fla
||
boo
)
{
//跟新未读
//跟新未读
Disposable
dis
=
httpHelper
.
getMsgDetail
(
new
MsgDetailParam
(
mDataList
.
get
(
position
).
id
))
Disposable
dis
=
httpHelper
.
getMsgDetail
(
new
MsgDetailParam
(
mDataList
.
get
(
position
).
id
))
.
compose
(
RxUtils
.
applySchedulers
(
lifecycleable
))
// .compose(RxUtils.applySchedulers(lifecycleable))
.
subscribeOn
(
Schedulers
.
io
())
.
compose
(
RxUtils
.
resultData
())
.
compose
(
RxUtils
.
resultData
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
msgDetail
->
{
.
subscribe
(
msgDetail
->
{
mDataList
.
get
(
position
).
is_read
=
2
;
mDataList
.
get
(
position
).
is_read
=
2
;
notifyDataSetChanged
();
notifyDataSetChanged
();
...
@@ -128,10 +131,13 @@ public class MsgListAdapter extends CommonAdapter<MsgData> {
...
@@ -128,10 +131,13 @@ public class MsgListAdapter extends CommonAdapter<MsgData> {
//如果是动态消息则到此结束,其它消息类型走下面流程
//如果是动态消息则到此结束,其它消息类型走下面流程
}
else
{
}
else
{
Disposable
di
=
httpHelper
.
getMsgDetail
(
new
MsgDetailParam
(
mDataList
.
get
(
position
).
id
))
Disposable
di
=
httpHelper
.
getMsgDetail
(
new
MsgDetailParam
(
mDataList
.
get
(
position
).
id
))
.
compose
(
RxUtils
.
applySchedulers
(
lifecycleable
))
// .compose(RxUtils.applySchedulers(lifecycleable))
.
subscribeOn
(
Schedulers
.
io
())
.
compose
(
RxUtils
.
resultData
())
.
compose
(
RxUtils
.
resultData
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
msgDetail
->
{
.
subscribe
(
msgDetail
->
{
mDataList
.
get
(
position
).
is_read
=
2
;
mDataList
.
get
(
position
).
is_read
=
2
;
notifyDataSetChanged
();
EventBus
.
getDefault
().
post
(
new
UpdateTabUnreadNumEvent
());
EventBus
.
getDefault
().
post
(
new
UpdateTabUnreadNumEvent
());
switch
(
msgDetail
.
type
)
{
switch
(
msgDetail
.
type
)
{
case
1
:
case
1
:
...
@@ -183,7 +189,6 @@ public class MsgListAdapter extends CommonAdapter<MsgData> {
...
@@ -183,7 +189,6 @@ public class MsgListAdapter extends CommonAdapter<MsgData> {
}
}
}
});
});
return
convertView
;
return
convertView
;
}
}
...
...
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