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
633f2c1b
Commit
633f2c1b
authored
Feb 06, 2020
by
ydl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
私聊模块剔除完成
parent
98db7101
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
346 additions
and
49 deletions
+346
-49
config.gradle
config.gradle
+10
-10
ConsultantServiceImp.kt
m-consultant/src/main/java/com/yidianling/consultant/modular/ConsultantServiceImp.kt
+25
-0
IConsultantService.kt
m-consultant/src/main/modular_api/com/yidianling/consultant/api/IConsultantService.kt
+10
-0
build.gradle
m-im/build.gradle
+4
-4
AndroidManifest.xml
m-im/src/main/AndroidManifest.xml
+12
-0
ImObserversHelper.kt
m-im/src/main/java/com/yidianling/im/helper/ImObserversHelper.kt
+1
-1
ImApi.kt
m-im/src/main/java/com/yidianling/im/http/ImApi.kt
+1
-1
ImHttp.kt
m-im/src/main/java/com/yidianling/im/http/ImHttp.kt
+4
-1
ImHttpImpl.kt
m-im/src/main/java/com/yidianling/im/http/ImHttpImpl.kt
+4
-4
IMServiceImpl.kt
m-im/src/main/java/com/yidianling/im/modular/service/IMServiceImpl.kt
+160
-0
ImIn.kt
m-im/src/main/java/com/yidianling/im/router/ImIn.kt
+1
-1
NewMultiMessageFragment.kt
m-im/src/main/java/com/yidianling/im/ui/page/NewMultiMessageFragment.kt
+12
-3
ChatAdapter.kt
m-im/src/main/java/com/yidianling/im/ui/page/fragment/adapter/ChatAdapter.kt
+16
-5
InteractAdapter.kt
m-im/src/main/java/com/yidianling/im/ui/page/fragment/adapter/InteractAdapter.kt
+1
-3
SystemItemView.java
m-im/src/main/java/com/yidianling/im/ui/view/SystemItemView.java
+1
-1
MsgDetail.java
m-im/src/main/modular_api/com/yidianling/im/api/bean/MsgDetail.java
+1
-1
MsgReadAll.java
m-im/src/main/modular_api/com/yidianling/im/api/bean/MsgReadAll.java
+1
-1
UpdateStatusBean.java
m-im/src/main/modular_api/com/yidianling/im/api/bean/UpdateStatusBean.java
+1
-1
ImLogoutEvent.kt
m-im/src/main/modular_api/com/yidianling/im/api/event/ImLogoutEvent.kt
+1
-1
MsgPushEvent.java
m-im/src/main/modular_api/com/yidianling/im/api/event/MsgPushEvent.java
+1
-1
UpdateBottomBarUnreadNumEvent.kt
m-im/src/main/modular_api/com/yidianling/im/api/event/UpdateBottomBarUnreadNumEvent.kt
+1
-1
ApiStringResponseCallback.kt
m-im/src/main/modular_api/com/yidianling/im/api/listener/ApiStringResponseCallback.kt
+6
-0
MsgDetailParam.kt
m-im/src/main/modular_api/com/yidianling/im/api/param/MsgDetailParam.kt
+0
-0
MsgListParam.kt
m-im/src/main/modular_api/com/yidianling/im/api/param/MsgListParam.kt
+0
-0
ReadMsgAllParam.java
m-im/src/main/modular_api/com/yidianling/im/api/param/ReadMsgAllParam.java
+1
-1
ReadParam.kt
m-im/src/main/modular_api/com/yidianling/im/api/param/ReadParam.kt
+0
-0
RmHistoryParam.java
m-im/src/main/modular_api/com/yidianling/im/api/param/RmHistoryParam.java
+1
-1
RmTalkParam.java
m-im/src/main/modular_api/com/yidianling/im/api/param/RmTalkParam.java
+1
-1
TopMessageParam.java
m-im/src/main/modular_api/com/yidianling/im/api/param/TopMessageParam.java
+1
-1
IImService.kt
m-im/src/main/modular_api/com/yidianling/im/api/service/IImService.kt
+61
-0
NewH5Activity.java
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
+7
-5
No files found.
config.gradle
View file @
633f2c1b
...
@@ -43,11 +43,11 @@ ext {
...
@@ -43,11 +43,11 @@ ext {
// -------------- 业务模块 --------------
// -------------- 业务模块 --------------
//第三步 若干
//第三步 若干
"m-confide"
:
"0.0.47.2"
,
"m-confide"
:
"0.0.47.2"
,
"m-consultant"
:
"0.0.56.
1
"
,
"m-consultant"
:
"0.0.56.
4
"
,
"m-fm"
:
"0.0.28"
,
"m-fm"
:
"0.0.28"
,
"m-user"
:
"0.0.56"
,
"m-user"
:
"0.0.56"
,
"m-home"
:
"0.0.20"
,
"m-home"
:
"0.0.20"
,
"m-im"
:
"0.0.1
1
"
,
"m-im"
:
"0.0.1
3.2
"
,
"m-dynamic"
:
"0.0.5.9"
,
"m-dynamic"
:
"0.0.5.9"
,
"m-muse"
:
"0.0.26"
,
"m-muse"
:
"0.0.26"
,
...
@@ -55,16 +55,16 @@ ext {
...
@@ -55,16 +55,16 @@ ext {
"m-course"
:
"0.0.40.2"
,
"m-course"
:
"0.0.40.2"
,
//-------------- 业务模块 API 层 --------------
//-------------- 业务模块 API 层 --------------
"m-audioim-api"
:
"0.0.
5
"
,
"m-audioim-api"
:
"0.0.
6
"
,
"m-confide-api"
:
"0.0.1.1"
,
"m-confide-api"
:
"0.0.1.1"
,
"m-consultant-api"
:
"0.0.
4
"
,
"m-consultant-api"
:
"0.0.
5.2
"
,
"m-course-api"
:
"0.0.3"
,
"m-course-api"
:
"0.0.3"
,
"m-fm-api"
:
"0.0.2"
,
"m-fm-api"
:
"0.0.2"
,
"m-muse-api"
:
"0.0.1"
,
"m-muse-api"
:
"0.0.1"
,
"m-tests-api"
:
"0.0.2"
,
"m-tests-api"
:
"0.0.2"
,
"m-user-api"
:
"0.0.9"
,
"m-user-api"
:
"0.0.9"
,
"m-home-api"
:
"0.0.4.1"
,
"m-home-api"
:
"0.0.4.1"
,
"m-im-api"
:
"0.0.
8
"
,
"m-im-api"
:
"0.0.
12.15
"
,
"m-dynamic-api"
:
"0.0.3.7"
,
"m-dynamic-api"
:
"0.0.3.7"
,
//-------------- 功能组件 --------------
//-------------- 功能组件 --------------
...
@@ -72,10 +72,10 @@ ext {
...
@@ -72,10 +72,10 @@ ext {
"ydl-platform"
:
"0.0.37.4"
,
"ydl-platform"
:
"0.0.37.4"
,
//第二步 若干
//第二步 若干
"ydl-webview"
:
"0.0.37.
1
"
,
"ydl-webview"
:
"0.0.37.
2
"
,
"ydl-media"
:
"0.0.20"
,
"ydl-media"
:
"0.0.20"
,
"ydl-pay"
:
"0.0.17"
,
"ydl-pay"
:
"0.0.17"
,
"m-audioim"
:
"0.0.46.
1
"
,
"m-audioim"
:
"0.0.46.
2
"
,
"ydl-flutter-base"
:
"0.0.10"
,
"ydl-flutter-base"
:
"0.0.10"
,
//以下 几乎不会动
//以下 几乎不会动
...
@@ -101,16 +101,16 @@ ext {
...
@@ -101,16 +101,16 @@ ext {
"m-tests"
:
"0.0.18.1"
,
"m-tests"
:
"0.0.18.1"
,
"m-course"
:
"0.0.34.10"
,
"m-course"
:
"0.0.34.10"
,
//-------------- 业务模块 API 层 --------------
//-------------- 业务模块 API 层 --------------
"m-audioim-api"
:
"0.0.
5
"
,
"m-audioim-api"
:
"0.0.
6
"
,
"m-confide-api"
:
"0.0.1.1"
,
"m-confide-api"
:
"0.0.1.1"
,
"m-consultant-api"
:
"0.0.
4
"
,
"m-consultant-api"
:
"0.0.
5.2
"
,
"m-course-api"
:
"0.0.3"
,
"m-course-api"
:
"0.0.3"
,
"m-fm-api"
:
"0.0.2"
,
"m-fm-api"
:
"0.0.2"
,
"m-muse-api"
:
"0.0.1"
,
"m-muse-api"
:
"0.0.1"
,
"m-tests-api"
:
"0.0.2"
,
"m-tests-api"
:
"0.0.2"
,
"m-user-api"
:
"0.0.9"
,
"m-user-api"
:
"0.0.9"
,
"m-home-api"
:
"0.0.4.1"
,
"m-home-api"
:
"0.0.4.1"
,
"m-im-api"
:
"0.0.
8
"
,
"m-im-api"
:
"0.0.
12.15
"
,
"m-dynamic-api"
:
"0.0.3.7"
,
"m-dynamic-api"
:
"0.0.3.7"
,
//-------------- 功能组件 --------------
//-------------- 功能组件 --------------
...
...
m-consultant/src/main/java/com/yidianling/consultant/modular/ConsultantServiceImp.kt
View file @
633f2c1b
...
@@ -3,8 +3,10 @@ package com.yidianling.consultant.modular
...
@@ -3,8 +3,10 @@ package com.yidianling.consultant.modular
import
android.app.Activity
import
android.app.Activity
import
android.content.Context
import
android.content.Context
import
android.content.Intent
import
android.content.Intent
import
android.support.v4.app.Fragment
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.yidianling.consultant.ExpertSearchActivity
import
com.yidianling.consultant.ExpertSearchActivity
import
com.yidianling.consultant.ExpertSearchFragment
import
com.yidianling.consultant.api.IConsultantService
import
com.yidianling.consultant.api.IConsultantService
import
com.yidianling.consultant.bean.Keyworks
import
com.yidianling.consultant.bean.Keyworks
import
com.yidianling.consultant.data.ConsultantDataManager
import
com.yidianling.consultant.data.ConsultantDataManager
...
@@ -16,6 +18,7 @@ import com.yidianling.consultant.modular.singlton.ConsultAssistantDialogUtils
...
@@ -16,6 +18,7 @@ import com.yidianling.consultant.modular.singlton.ConsultAssistantDialogUtils
@Route
(
path
=
"/consultant/ConsultantService"
)
@Route
(
path
=
"/consultant/ConsultantService"
)
class
ConsultantServiceImp
:
IConsultantService
{
class
ConsultantServiceImp
:
IConsultantService
{
override
fun
init
(
context
:
Context
?)
{
override
fun
init
(
context
:
Context
?)
{
}
}
...
@@ -42,4 +45,25 @@ class ConsultantServiceImp: IConsultantService {
...
@@ -42,4 +45,25 @@ class ConsultantServiceImp: IConsultantService {
ConsultAssistantDialogUtils
.
INSTANCE
.
hideFromHomePage
()
ConsultAssistantDialogUtils
.
INSTANCE
.
hideFromHomePage
()
}
}
override
fun
startExpertSearchActivity
(
mContext
:
Context
,
category
:
Int
,
categoryName
:
String
,
showType
:
Int
)
{
ExpertSearchActivity
.
start
(
mContext
,
category
,
categoryName
,
showType
)
}
override
fun
startExpertSearchActivity
(
mContext
:
Context
,
category
:
Int
)
{
ExpertSearchActivity
.
start
(
mContext
,
category
)
}
override
fun
getExpertSearchFragment
():
Fragment
{
return
ExpertSearchFragment
()
}
override
fun
resetConsultAssistantDialogStatus
()
{
ConsultAssistantDialogUtils
.
INSTANCE
.
resetStatus
()
}
}
}
\ No newline at end of file
m-consultant/src/main/modular_api/com/yidianling/consultant/api/IConsultantService.kt
View file @
633f2c1b
package
com.yidianling.consultant.api
package
com.yidianling.consultant.api
import
android.app.Activity
import
android.app.Activity
import
android.content.Context
import
android.support.v4.app.Fragment
import
com.alibaba.android.arouter.facade.template.IProvider
import
com.alibaba.android.arouter.facade.template.IProvider
import
com.yidianling.consultant.bean.Keyworks
import
com.yidianling.consultant.bean.Keyworks
...
@@ -13,10 +15,17 @@ interface IConsultantService: IProvider {
...
@@ -13,10 +15,17 @@ interface IConsultantService: IProvider {
// 隐藏咨询助理弹框
// 隐藏咨询助理弹框
fun
hideConsultAssistantDialog
()
fun
hideConsultAssistantDialog
()
fun
resetConsultAssistantDialogStatus
()
fun
expertSearchIntent
(
activity
:
android
.
app
.
Activity
,
category
:
kotlin
.
Int
,
showType
:
kotlin
.
Int
,
isInitShowHot
:
kotlin
.
Boolean
):
android
.
content
.
Intent
fun
expertSearchIntent
(
activity
:
android
.
app
.
Activity
,
category
:
kotlin
.
Int
,
showType
:
kotlin
.
Int
,
isInitShowHot
:
kotlin
.
Boolean
):
android
.
content
.
Intent
fun
startExpertSearchActivity
(
context
:
Context
,
category
:
Int
,
categoryName
:
String
,
showType
:
Int
)
fun
startExpertSearchActivity
(
mContext
:
Context
,
category
:
Int
)
fun
getHotSearch
():
kotlin
.
collections
.
MutableList
<
Keyworks
>
fun
getHotSearch
():
kotlin
.
collections
.
MutableList
<
Keyworks
>
fun
setHotSearch
(
hotSearch
:
kotlin
.
collections
.
MutableList
<
Keyworks
>):
kotlin
.
Unit
fun
setHotSearch
(
hotSearch
:
kotlin
.
collections
.
MutableList
<
Keyworks
>):
kotlin
.
Unit
fun
getExpertSearchFragment
():
Fragment
}
}
\ No newline at end of file
m-im/build.gradle
View file @
633f2c1b
...
@@ -84,10 +84,10 @@ dependencies {
...
@@ -84,10 +84,10 @@ dependencies {
androidTestImplementation
'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation
'com.android.support.test.espresso:espresso-core:3.0.2'
implementation
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
kapt
'com.alibaba:arouter-compiler:1.2.2'
kapt
'com.alibaba:arouter-compiler:1.2.2'
api
'com.ydl:nim-base:1.0.4'
implementation
'com.ydl:nim-base:1.0.4'
api
'com.netease.nimlib:basesdk:7.0.3'
implementation
'com.netease.nimlib:basesdk:7.0.3'
api
'com.netease.nimlib:avchat:7.0.3'
implementation
'com.netease.nimlib:avchat:7.0.3'
api
'com.netease.nimlib:nrtc:7.0.3'
implementation
'com.netease.nimlib:nrtc:7.0.3'
api
rootProject
.
ext
.
dependencies
[
"ydl-user-router"
]
api
rootProject
.
ext
.
dependencies
[
"ydl-user-router"
]
if
(
rootProject
.
ext
.
dev_mode
){
if
(
rootProject
.
ext
.
dev_mode
){
...
...
m-im/src/main/AndroidManifest.xml
View file @
633f2c1b
...
@@ -28,6 +28,18 @@
...
@@ -28,6 +28,18 @@
<application>
<application>
<receiver
android:name=
"com.netease.nimlib.mixpush.hw.HWPushReceiver"
>
<intent-filter>
<action
android:name=
"com.huawei.android.push.intent.REGISTRATION"
/>
<action
android:name=
"com.huawei.android.push.intent.RECEIVE"
/>
<action
android:name=
"com.huawei.android.push.intent.CLICK"
/>
<action
android:name=
"com.huawei.intent.action.PUSH_STATE"
/>
</intent-filter>
<meta-data
android:name=
"CS_cloud_ablitity"
android:value=
"successRateAnalytics"
/>
</receiver>
<!-- ==================== IM ==================== -->
<!-- ==================== IM ==================== -->
<!-- ==================== IM ==================== -->
<!-- ==================== IM ==================== -->
<!-- ==================== IM ==================== -->
<!-- ==================== IM ==================== -->
...
...
m-im/src/main/java/com/yidianling/im/helper/ImObserversHelper.kt
View file @
633f2c1b
...
@@ -17,7 +17,7 @@ import com.netease.nimlib.sdk.msg.model.RevokeMsgNotification
...
@@ -17,7 +17,7 @@ import com.netease.nimlib.sdk.msg.model.RevokeMsgNotification
import
com.netease.nimlib.sdk.team.TeamServiceObserver
import
com.netease.nimlib.sdk.team.TeamServiceObserver
import
com.netease.nimlib.sdk.team.model.Team
import
com.netease.nimlib.sdk.team.model.Team
import
com.yidianling.im.api.event.AccountChangeEvent
import
com.yidianling.im.api.event.AccountChangeEvent
import
com.yidianling.im.event.MsgPushEvent
import
com.yidianling.im.
api.
event.MsgPushEvent
import
com.yidianling.im.event.TeamRemoveEvent
import
com.yidianling.im.event.TeamRemoveEvent
import
com.yidianling.im.preference.IMCache
import
com.yidianling.im.preference.IMCache
import
com.yidianling.im.preference.ImTempData
import
com.yidianling.im.preference.ImTempData
...
...
m-im/src/main/java/com/yidianling/im/http/ImApi.kt
View file @
633f2c1b
...
@@ -5,12 +5,12 @@ import com.ydl.ydlcommon.base.config.YDL_DOMAIN
...
@@ -5,12 +5,12 @@ import com.ydl.ydlcommon.base.config.YDL_DOMAIN
import
com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
import
com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlcommon.data.http.BaseResponse
import
com.ydl.ydlcommon.data.http.BaseResponse
import
com.yidianling.im.api.bean.*
import
com.yidianling.im.bean.*
import
com.yidianling.im.bean.*
import
com.yidianling.im.ui.page.fragment.bean.ChatModelBean
import
com.yidianling.im.ui.page.fragment.bean.ChatModelBean
import
com.yidianling.im.ui.page.fragment.bean.InteractBean
import
com.yidianling.im.ui.page.fragment.bean.InteractBean
import
com.yidianling.im.ui.page.fragment.bean.NoticeItemBean
import
com.yidianling.im.ui.page.fragment.bean.NoticeItemBean
import
com.yidianling.im.ui.page.fragment.bean.UnreadMessageBean
import
com.yidianling.im.ui.page.fragment.bean.UnreadMessageBean
import
com.yidianling.im.api.bean.IMExpertBuild
import
io.reactivex.Observable
import
io.reactivex.Observable
import
retrofit2.http.*
import
retrofit2.http.*
...
...
m-im/src/main/java/com/yidianling/im/http/ImHttp.kt
View file @
633f2c1b
...
@@ -7,9 +7,12 @@ import com.yidianling.im.message.param.MsgListParam
...
@@ -7,9 +7,12 @@ import com.yidianling.im.message.param.MsgListParam
import
com.yidianling.im.message.param.ReadParam
import
com.yidianling.im.message.param.ReadParam
import
com.yidianling.im.ui.page.fragment.bean.*
import
com.yidianling.im.ui.page.fragment.bean.*
import
com.yidianling.im.ui.param.*
import
com.yidianling.im.ui.param.*
import
com.yidianling.im.api.bean.IMExpertBuild
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlcommon.data.http.BaseResponse
import
com.ydl.ydlcommon.data.http.BaseResponse
import
com.yidianling.im.api.bean.*
import
com.yidianling.im.api.param.RmHistoryParam
import
com.yidianling.im.api.param.RmTalkParam
import
com.yidianling.im.api.param.TopMessageParam
import
io.reactivex.Observable
import
io.reactivex.Observable
/**
/**
...
...
m-im/src/main/java/com/yidianling/im/http/ImHttpImpl.kt
View file @
633f2c1b
...
@@ -4,11 +4,12 @@ import com.ydl.ydlcommon.data.http.BaseAPIResponse
...
@@ -4,11 +4,12 @@ import com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlcommon.data.http.BaseResponse
import
com.ydl.ydlcommon.data.http.BaseResponse
import
com.ydl.ydlcommon.data.http.RxUtils
import
com.ydl.ydlcommon.data.http.RxUtils
import
com.ydl.ydlnet.YDLHttpUtils
import
com.ydl.ydlnet.YDLHttpUtils
import
com.yidianling.im.api.bean.*
import
com.yidianling.im.bean.*
import
com.yidianling.im.bean.*
import
com.yidianling.im.http.param.ExpertParam
import
com.yidianling.im.http.param.ExpertParam
import
com.yidianling.im.
http
.param.RmHistoryParam
import
com.yidianling.im.
api
.param.RmHistoryParam
import
com.yidianling.im.
http
.param.RmTalkParam
import
com.yidianling.im.
api
.param.RmTalkParam
import
com.yidianling.im.
http
.param.TopMessageParam
import
com.yidianling.im.
api
.param.TopMessageParam
import
com.yidianling.im.message.param.MsgDetailParam
import
com.yidianling.im.message.param.MsgDetailParam
import
com.yidianling.im.message.param.MsgListParam
import
com.yidianling.im.message.param.MsgListParam
import
com.yidianling.im.message.param.ReadParam
import
com.yidianling.im.message.param.ReadParam
...
@@ -17,7 +18,6 @@ import com.yidianling.im.ui.page.fragment.bean.InteractBean
...
@@ -17,7 +18,6 @@ import com.yidianling.im.ui.page.fragment.bean.InteractBean
import
com.yidianling.im.ui.page.fragment.bean.NoticeItemBean
import
com.yidianling.im.ui.page.fragment.bean.NoticeItemBean
import
com.yidianling.im.ui.page.fragment.bean.UnreadMessageBean
import
com.yidianling.im.ui.page.fragment.bean.UnreadMessageBean
import
com.yidianling.im.ui.param.*
import
com.yidianling.im.ui.param.*
import
com.yidianling.im.api.bean.IMExpertBuild
import
io.reactivex.Observable
import
io.reactivex.Observable
/**
/**
...
...
m-im/src/main/java/com/yidianling/im/modular/service/IMServiceImpl.kt
View file @
633f2c1b
package
com.yidianling.im.modular.service
package
com.yidianling.im.modular.service
import
android.annotation.SuppressLint
import
android.app.Activity
import
android.app.Activity
import
android.app.Application
import
android.content.Context
import
android.content.Context
import
android.support.v4.app.Fragment
import
android.support.v7.app.AppCompatActivity
import
android.support.v7.app.AppCompatActivity
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.netease.nimlib.sdk.NIMClient
import
com.netease.nimlib.sdk.NIMClient
...
@@ -11,23 +14,35 @@ import com.netease.nimlib.sdk.auth.LoginInfo
...
@@ -11,23 +14,35 @@ import com.netease.nimlib.sdk.auth.LoginInfo
import
com.netease.nimlib.sdk.msg.MessageBuilder
import
com.netease.nimlib.sdk.msg.MessageBuilder
import
com.netease.nimlib.sdk.msg.MsgService
import
com.netease.nimlib.sdk.msg.MsgService
import
com.netease.nimlib.sdk.msg.constant.SessionTypeEnum
import
com.netease.nimlib.sdk.msg.constant.SessionTypeEnum
import
com.ydl.webview.NewH5Activity
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.router.YdlCommonOut
import
com.ydl.ydlcommon.router.YdlCommonOut
import
com.ydl.ydlcommon.utils.StringUtils
import
com.ydl.ydlcommon.utils.StringUtils
import
com.ydl.ydlcommon.utils.remind.HttpErrorUtils
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.im.R
import
com.yidianling.im.R
import
com.yidianling.im.api.bean.IMLoginInfo
import
com.yidianling.im.api.bean.IMLoginInfo
import
com.yidianling.im.api.bean.IMRequestCallback
import
com.yidianling.im.api.bean.IMRequestCallback
import
com.yidianling.im.api.listener.ApiStringResponseCallback
import
com.yidianling.im.api.service.IImService
import
com.yidianling.im.api.service.IImService
import
com.yidianling.im.bridge.P2PCustomActionHandlerImpl
import
com.yidianling.im.bridge.P2PCustomActionHandlerImpl
import
com.yidianling.im.config.NimApplication
import
com.yidianling.im.helper.IMUtil
import
com.yidianling.im.helper.IMUtil
import
com.yidianling.im.helper.LogoutHelper
import
com.yidianling.im.helper.MsgReceiveHelper
import
com.yidianling.im.helper.MsgReceiveHelper
import
com.yidianling.im.http.ImRetrofitApi
import
com.yidianling.im.preference.IMCache
import
com.yidianling.im.preference.IMCache
import
com.yidianling.im.router.ImIn
import
com.yidianling.im.router.ImIn
import
com.yidianling.im.session.SessionHelper
import
com.yidianling.im.session.SessionHelper
import
com.yidianling.im.session.extension.CustomAttachModifyTime
import
com.yidianling.im.session.extension.CustomAttachSubScriptTime
import
com.yidianling.im.session.extension.CustomAttachSubScriptTime
import
com.yidianling.im.session.extension.CustomAttachmentTest
import
com.yidianling.im.session.extension.CustomAttachmentTest
import
com.yidianling.im.ui.page.NewMultiMessageFragment
import
com.yidianling.nimbase.common.media.picker.PickImageHelper
import
com.yidianling.nimbase.common.media.picker.PickImageHelper
import
com.yidianling.uikit.api.NimUIKit
import
com.yidianling.uikit.api.NimUIKit
import
com.yidianling.uikit.business.session.helper.MessageListPanelHelper
import
com.yidianling.uikit.business.session.helper.MessageListPanelHelper
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.schedulers.Schedulers
/**
/**
* Created by haorui on 2019-12-11 .
* Created by haorui on 2019-12-11 .
...
@@ -198,6 +213,11 @@ class IMServiceImpl : IImService {
...
@@ -198,6 +213,11 @@ class IMServiceImpl : IImService {
IMUtil
.
startChat
(
context
as
AppCompatActivity
,
toUid
,
0
x001
,
canTalk
,
null
,
0
,
false
)
IMUtil
.
startChat
(
context
as
AppCompatActivity
,
toUid
,
0
x001
,
canTalk
,
null
,
0
,
false
)
}
}
override
fun
startChat
(
context
:
Activity
,
toUid
:
String
,
flag
:
Int
,
canTalk
:
Int
,
isFramQingsu
:
Int
,
isFromMessageList
:
Boolean
)
{
//这里虽然是倾述流程进入私聊,但不需要发送自定义消息
IMUtil
.
startChat
(
context
as
AppCompatActivity
,
toUid
,
0
x001
,
canTalk
,
null
,
isFramQingsu
,
isFromMessageList
)
}
override
fun
getUnReadByUid
(
uid
:
String
):
Int
{
override
fun
getUnReadByUid
(
uid
:
String
):
Int
{
return
MsgReceiveHelper
.
getUnNum
(
uid
)
return
MsgReceiveHelper
.
getUnNum
(
uid
)
}
}
...
@@ -205,4 +225,143 @@ class IMServiceImpl : IImService {
...
@@ -205,4 +225,143 @@ class IMServiceImpl : IImService {
override
fun
getAllUnReadNum
():
Int
{
override
fun
getAllUnReadNum
():
Int
{
return
MsgReceiveHelper
.
getAllUnNum
()
return
MsgReceiveHelper
.
getAllUnNum
()
}
}
override
fun
getMultiMessageFragment
():
Fragment
{
return
NewMultiMessageFragment
()
}
override
fun
nextUnreadItem
(
fragment
:
Fragment
):
Boolean
{
if
(
fragment
is
NewMultiMessageFragment
)
{
fragment
.
nextUnReadItem
()
return
true
}
return
false
}
override
fun
isChatFragment
(
fragment
:
Fragment
):
Boolean
{
if
(
fragment
is
NewMultiMessageFragment
)
{
return
true
}
return
false
}
override
fun
isImLogin
():
Boolean
{
return
ImIn
.
isLogin
()
}
override
fun
requestTopUnReadNumber
(
fragment
:
Fragment
)
{
if
(
fragment
is
NewMultiMessageFragment
)
{
fragment
.
requestTopUnReadNumber
()
}
}
override
fun
loginIm
(
uid
:
String
?,
hxPwd
:
String
?)
{
ImIn
.
loginIm
(
uid
?:
""
,
hxPwd
?:
""
)
}
override
fun
logoutAll
()
{
LogoutHelper
.
logout
()
}
override
fun
initImCache
(
mContext
:
Context
)
{
IMCache
.
setContext
(
mContext
)
}
override
fun
startKefuChat
(
context
:
Context
,
toUid
:
String
,
flag
:
Int
,
canTalk
:
Int
)
{
IMUtil
.
startKefuChat
(
context
as
AppCompatActivity
,
toUid
,
flag
,
canTalk
,
null
)
}
override
fun
startP2PSession
(
mContext
:
Context
,
userType
:
Int
,
account
:
String
,
toChatUsername
:
String
,
toName
:
String
,
head
:
String
)
{
SessionHelper
.
startP2PSession
(
mContext
,
userType
,
account
,
null
,
P2PCustomActionHandlerImpl
(
toChatUsername
,
toName
,
head
))
}
override
fun
updateUserHead
(
head
:
String
?)
{
ImIn
.
updateUserHead
(
head
?:
""
)
}
override
fun
updateUserName
(
name
:
String
?)
{
ImIn
.
updateUserName
(
name
?:
""
)
}
override
fun
imInSetRing
(
bool
:
Boolean
)
{
ImIn
.
setRing
(
bool
)
}
override
fun
imInSetVibrate
(
bool
:
Boolean
)
{
ImIn
.
setVibrate
(
bool
)
}
override
fun
getUserInfoDescription
():
String
?
{
return
ImIn
.
getUserInfo
()
!!
.
description
}
override
fun
getEarModeCloseType
():
String
{
return
NimApplication
.
EAR_MODE_CLOSE
}
override
fun
getEarModeKey
():
String
{
return
NimApplication
.
EAR_MODE_KEY
}
override
fun
getEarModeOpenType
():
String
{
return
NimApplication
.
EAR_MODE_OPEN
}
override
fun
getEarModeIsOpen
():
Boolean
{
return
ImIn
.
getEarModeIsOpen
()
}
override
fun
updateEarMode
(
bool
:
Boolean
)
{
ImIn
.
updateEarMode
(
bool
)
}
@SuppressLint
(
"CheckResult"
)
override
fun
getChatUid
(
context
:
Context
?,
uid
:
String
,
callback
:
ApiStringResponseCallback
)
{
ImRetrofitApi
.
getImJavaApi
().
getChatUid
(
uid
)
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
({
resp
->
callback
.
onUidCallback
(
resp
.
data
.
getChatUid
())
},
{
t
->
context
?.
let
{
HttpErrorUtils
.
handleError
(
context
,
t
)
}
})
}
override
fun
chatScheule
(
context
:
Activity
,
userUrl
:
String
,
docUrl
:
String
,
dsmId
:
Int
,
title
:
String
,
toUid
:
Int
)
{
val
customAttachModifyTime
=
CustomAttachModifyTime
(
userUrl
,
docUrl
,
dsmId
,
title
)
val
message
=
MessageBuilder
.
createCustomMessage
(
toUid
.
toString
(),
SessionTypeEnum
.
P2P
,
customAttachModifyTime
)
NIMClient
.
getService
(
MsgService
::
class
.
java
).
sendMessage
(
message
,
false
)
.
setCallback
(
object
:
RequestCallback
<
Void
>
{
override
fun
onSuccess
(
param
:
Void
)
{
startChat
(
context
,
toUid
.
toString
(),
0
x001
,
0
)
}
override
fun
onFailed
(
code
:
Int
)
{
ToastUtil
.
toastShort
(
"加载失败"
)
}
override
fun
onException
(
exception
:
Throwable
)
{
ToastUtil
.
toastShort
(
"加载失败"
)
}
})
}
override
fun
initIm
(
app
:
Application
,
activity
:
Class
<
out
Activity
>)
{
NimApplication
.
getInstance
().
initIm
(
app
,
activity
)
}
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/im/router/ImIn.kt
View file @
633f2c1b
...
@@ -137,7 +137,7 @@ object ImIn {
...
@@ -137,7 +137,7 @@ object ImIn {
/**
/**
* 跳转话题详情
* 跳转话题详情
*/
*/
fun
topicDetailActivity
(
context
:
Context
,
topic_id
:
String
){
fun
topicDetailActivity
(
context
:
Activity
,
topic_id
:
String
){
var
intent
=
getDynamicService
().
topicDetailIntent
(
context
,
false
,
topic_id
)
var
intent
=
getDynamicService
().
topicDetailIntent
(
context
,
false
,
topic_id
)
intent
?.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
)
intent
?.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
)
context
.
startActivity
(
intent
)
context
.
startActivity
(
intent
)
...
...
m-im/src/main/java/com/yidianling/im/ui/page/NewMultiMessageFragment.kt
View file @
633f2c1b
...
@@ -5,7 +5,6 @@ import android.annotation.SuppressLint
...
@@ -5,7 +5,6 @@ import android.annotation.SuppressLint
import
android.os.Bundle
import
android.os.Bundle
import
android.support.v4.app.Fragment
import
android.support.v4.app.Fragment
import
android.support.v4.view.ViewPager
import
android.support.v4.view.ViewPager
import
android.util.Log
import
android.view.View
import
android.view.View
import
android.view.WindowManager
import
android.view.WindowManager
import
com.alibaba.android.arouter.launcher.ARouter
import
com.alibaba.android.arouter.launcher.ARouter
...
@@ -17,6 +16,8 @@ import com.ydl.ydlcommon.bean.StatusBarOptions
...
@@ -17,6 +16,8 @@ import com.ydl.ydlcommon.bean.StatusBarOptions
import
com.ydl.ydlcommon.data.http.RxUtils
import
com.ydl.ydlcommon.data.http.RxUtils
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.im.R
import
com.yidianling.im.R
import
com.yidianling.im.api.event.ImLogoutEvent
import
com.yidianling.im.api.event.UpdateBottomBarUnreadNumEvent
import
com.yidianling.im.bridge.P2PCustomActionHandlerImpl
import
com.yidianling.im.bridge.P2PCustomActionHandlerImpl
import
com.yidianling.im.event.*
import
com.yidianling.im.event.*
import
com.yidianling.im.helper.MsgReceiveHelper
import
com.yidianling.im.helper.MsgReceiveHelper
...
@@ -214,7 +215,11 @@ class NewMultiMessageFragment : BaseFragment() {
...
@@ -214,7 +215,11 @@ class NewMultiMessageFragment : BaseFragment() {
MsgReceiveHelper
.
isHasUnread
=
chatListUnreadNum
>
0
||
interactListUnreadNum
>
0
||
noticeListUnreadNum
>
0
MsgReceiveHelper
.
isHasUnread
=
chatListUnreadNum
>
0
||
interactListUnreadNum
>
0
||
noticeListUnreadNum
>
0
// 同步底部导航栏的角标数量
// 同步底部导航栏的角标数量
EventBus
.
getDefault
().
post
(
UpdateBottomBarUnreadNumEvent
(
chatListUnreadNum
+
interactListUnreadNum
+
noticeListUnreadNum
))
EventBus
.
getDefault
().
post
(
UpdateBottomBarUnreadNumEvent
(
chatListUnreadNum
+
interactListUnreadNum
+
noticeListUnreadNum
)
)
}
}
/**
/**
...
@@ -383,7 +388,11 @@ class NewMultiMessageFragment : BaseFragment() {
...
@@ -383,7 +388,11 @@ class NewMultiMessageFragment : BaseFragment() {
(
mFragmentsList
[
0
]
as
ChatFragment
).
getChatMessageData
()
(
mFragmentsList
[
0
]
as
ChatFragment
).
getChatMessageData
()
}
}
// 同步底部导航栏的角标数量
// 同步底部导航栏的角标数量
EventBus
.
getDefault
().
post
(
UpdateBottomBarUnreadNumEvent
(
chatListUnreadNum
+
interactListUnreadNum
+
noticeListUnreadNum
))
EventBus
.
getDefault
().
post
(
UpdateBottomBarUnreadNumEvent
(
chatListUnreadNum
+
interactListUnreadNum
+
noticeListUnreadNum
)
)
}
catch
(
e
:
Exception
)
{
}
catch
(
e
:
Exception
)
{
}
}
}
}
...
...
m-im/src/main/java/com/yidianling/im/ui/page/fragment/adapter/ChatAdapter.kt
View file @
633f2c1b
...
@@ -20,9 +20,9 @@ import com.yidianling.im.event.UpdateTabUnreadNumEvent
...
@@ -20,9 +20,9 @@ import com.yidianling.im.event.UpdateTabUnreadNumEvent
import
com.yidianling.im.helper.IMUtil
import
com.yidianling.im.helper.IMUtil
import
com.yidianling.im.helper.MsgReceiveHelper
import
com.yidianling.im.helper.MsgReceiveHelper
import
com.yidianling.im.http.ImHttpImpl
import
com.yidianling.im.http.ImHttpImpl
import
com.yidianling.im.
http
.param.RmHistoryParam
import
com.yidianling.im.
api
.param.RmHistoryParam
import
com.yidianling.im.
http
.param.RmTalkParam
import
com.yidianling.im.
api
.param.RmTalkParam
import
com.yidianling.im.
http
.param.TopMessageParam
import
com.yidianling.im.
api
.param.TopMessageParam
import
com.yidianling.im.session.SessionHelper
import
com.yidianling.im.session.SessionHelper
import
com.yidianling.im.ui.page.fragment.bean.ChatItemBean
import
com.yidianling.im.ui.page.fragment.bean.ChatItemBean
import
com.yidianling.im.ui.page.fragment.view.ChatItemView
import
com.yidianling.im.ui.page.fragment.view.ChatItemView
...
@@ -138,7 +138,12 @@ class ChatAdapter(var context: Context, private var mList: ArrayList<ChatItemBea
...
@@ -138,7 +138,12 @@ class ChatAdapter(var context: Context, private var mList: ArrayList<ChatItemBea
private
fun
delete
(
bean
:
ChatItemBean
)
{
private
fun
delete
(
bean
:
ChatItemBean
)
{
LogHelper
.
getInstance
().
writeLogSync
(
"删除聊天:uid = "
+
bean
.
toUid
)
LogHelper
.
getInstance
().
writeLogSync
(
"删除聊天:uid = "
+
bean
.
toUid
)
var
dis
=
ImHttpImpl
.
getInstance
().
rmHistory
(
RmHistoryParam
(
bean
.
toUid
.
toString
(),
1
))
var
dis
=
ImHttpImpl
.
getInstance
().
rmHistory
(
RmHistoryParam
(
bean
.
toUid
.
toString
(),
1
)
)
.
compose
(
RxUtils
.
applySchedulers
(
lifecycleable
))
.
compose
(
RxUtils
.
applySchedulers
(
lifecycleable
))
.
compose
(
RxUtils
.
resultData
())
.
compose
(
RxUtils
.
resultData
())
.
subscribe
({
o
->
.
subscribe
({
o
->
...
@@ -170,7 +175,13 @@ class ChatAdapter(var context: Context, private var mList: ArrayList<ChatItemBea
...
@@ -170,7 +175,13 @@ class ChatAdapter(var context: Context, private var mList: ArrayList<ChatItemBea
private
fun
toTop
(
bean
:
ChatItemBean
,
istop
:
Int
)
{
private
fun
toTop
(
bean
:
ChatItemBean
,
istop
:
Int
)
{
LogHelper
.
getInstance
().
writeLogSync
(
"置顶聊天:uid = "
+
bean
.
toUid
.
toString
()
+
LogHelper
.
getInstance
().
writeLogSync
(
"置顶聊天:uid = "
+
bean
.
toUid
.
toString
()
+
"取消置顶 = "
+
(
istop
==
0
))
"取消置顶 = "
+
(
istop
==
0
))
var
dis
=
ImHttpImpl
.
getInstance
().
topMessage
(
TopMessageParam
(
bean
.
toUid
.
toString
(),
1
,
istop
))
var
dis
=
ImHttpImpl
.
getInstance
().
topMessage
(
TopMessageParam
(
bean
.
toUid
.
toString
(),
1
,
istop
)
)
.
compose
(
RxUtils
.
applySchedulers
(
lifecycleable
))
.
compose
(
RxUtils
.
applySchedulers
(
lifecycleable
))
.
compose
(
RxUtils
.
resultData
())
.
compose
(
RxUtils
.
resultData
())
.
subscribe
({
o
->
.
subscribe
({
o
->
...
...
m-im/src/main/java/com/yidianling/im/ui/page/fragment/adapter/InteractAdapter.kt
View file @
633f2c1b
...
@@ -9,9 +9,8 @@ import com.ydl.webview.H5Params
...
@@ -9,9 +9,8 @@ import com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.webview.NewH5Activity
import
com.ydl.ydlcommon.data.http.RxUtils
import
com.ydl.ydlcommon.data.http.RxUtils
import
com.ydl.ydlcommon.utils.StringUtils
import
com.ydl.ydlcommon.utils.StringUtils
import
com.yidianling.im.bean.MsgDetail
import
com.yidianling.im.
api.
bean.MsgDetail
import
com.yidianling.im.config.constants.ImConstants
import
com.yidianling.im.config.constants.ImConstants
import
com.yidianling.im.event.ReQureyUnreadNum
import
com.yidianling.im.http.ImHttpImpl
import
com.yidianling.im.http.ImHttpImpl
import
com.yidianling.im.message.param.MsgDetailParam
import
com.yidianling.im.message.param.MsgDetailParam
import
com.yidianling.im.router.ImIn
import
com.yidianling.im.router.ImIn
...
@@ -19,7 +18,6 @@ import com.yidianling.im.ui.page.fragment.bean.InteractItemBean
...
@@ -19,7 +18,6 @@ import com.yidianling.im.ui.page.fragment.bean.InteractItemBean
import
com.yidianling.im.ui.page.fragment.view.InteractFooterItemView
import
com.yidianling.im.ui.page.fragment.view.InteractFooterItemView
import
com.yidianling.im.ui.page.fragment.view.InteractItemView
import
com.yidianling.im.ui.page.fragment.view.InteractItemView
import
com.yidianling.im.ui.page.fragment.view.InteractTimeItemView
import
com.yidianling.im.ui.page.fragment.view.InteractTimeItemView
import
de.greenrobot.event.EventBus
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.android.schedulers.AndroidSchedulers
/**
/**
...
...
m-im/src/main/java/com/yidianling/im/ui/view/SystemItemView.java
View file @
633f2c1b
...
@@ -183,7 +183,7 @@ public class SystemItemView extends LinearLayout {
...
@@ -183,7 +183,7 @@ public class SystemItemView extends LinearLayout {
switch
(
uri
.
getHost
())
{
switch
(
uri
.
getHost
())
{
case
"topic"
:
case
"topic"
:
if
(!
TextUtils
.
isEmpty
(
id
))
{
if
(!
TextUtils
.
isEmpty
(
id
))
{
ImIn
.
INSTANCE
.
topicDetailActivity
(
context
,
id
);
ImIn
.
INSTANCE
.
topicDetailActivity
(
(
Activity
)
context
,
id
);
}
}
break
;
break
;
case
"active"
:
case
"active"
:
...
...
m-im/src/main/
java/com/yidianling/im
/bean/MsgDetail.java
→
m-im/src/main/
modular_api/com/yidianling/im/api
/bean/MsgDetail.java
View file @
633f2c1b
package
com
.
yidianling
.
im
.
bean
;
package
com
.
yidianling
.
im
.
api
.
bean
;
/**
/**
* type: 消息类型
* type: 消息类型
...
...
m-im/src/main/
java/com/yidianling/im
/bean/MsgReadAll.java
→
m-im/src/main/
modular_api/com/yidianling/im/api
/bean/MsgReadAll.java
View file @
633f2c1b
package
com
.
yidianling
.
im
.
bean
;
package
com
.
yidianling
.
im
.
api
.
bean
;
public
class
MsgReadAll
{
public
class
MsgReadAll
{
public
int
update_status
;
public
int
update_status
;
...
...
m-im/src/main/
java/com/yidianling/im
/bean/UpdateStatusBean.java
→
m-im/src/main/
modular_api/com/yidianling/im/api
/bean/UpdateStatusBean.java
View file @
633f2c1b
package
com
.
yidianling
.
im
.
bean
;
package
com
.
yidianling
.
im
.
api
.
bean
;
public
class
UpdateStatusBean
{
public
class
UpdateStatusBean
{
public
int
update_status
;
public
int
update_status
;
...
...
m-im/src/main/
java/com/yidianling/im
/event/ImLogoutEvent.kt
→
m-im/src/main/
modular_api/com/yidianling/im/api
/event/ImLogoutEvent.kt
View file @
633f2c1b
package
com.yidianling.im.event
package
com.yidianling.im.
api.
event
/**
/**
* Created by xj on 2019/10/25.
* Created by xj on 2019/10/25.
...
...
m-im/src/main/
java/com/yidianling/im
/event/MsgPushEvent.java
→
m-im/src/main/
modular_api/com/yidianling/im/api
/event/MsgPushEvent.java
View file @
633f2c1b
package
com
.
yidianling
.
im
.
event
;
package
com
.
yidianling
.
im
.
api
.
event
;
/**
/**
* @author jiucheng
* @author jiucheng
...
...
m-im/src/main/
java/com/yidianling/im
/event/UpdateBottomBarUnreadNumEvent.kt
→
m-im/src/main/
modular_api/com/yidianling/im/api
/event/UpdateBottomBarUnreadNumEvent.kt
View file @
633f2c1b
package
com.yidianling.im.event
package
com.yidianling.im.
api.
event
/**
/**
* 刷新底部导航栏角标
* 刷新底部导航栏角标
...
...
m-im/src/main/modular_api/com/yidianling/im/api/listener/ApiStringResponseCallback.kt
0 → 100644
View file @
633f2c1b
package
com.yidianling.im.api.listener
interface
ApiStringResponseCallback
{
fun
onUidCallback
(
uid
:
String
)
}
\ No newline at end of file
m-im/src/main/
java/com/yidianling/im/http
/param/MsgDetailParam.kt
→
m-im/src/main/
modular_api/com/yidianling/im/api
/param/MsgDetailParam.kt
View file @
633f2c1b
File moved
m-im/src/main/
java/com/yidianling/im/http
/param/MsgListParam.kt
→
m-im/src/main/
modular_api/com/yidianling/im/api
/param/MsgListParam.kt
View file @
633f2c1b
File moved
m-im/src/main/
java/com/yidianling/im/http
/param/ReadMsgAllParam.java
→
m-im/src/main/
modular_api/com/yidianling/im/api
/param/ReadMsgAllParam.java
View file @
633f2c1b
package
com
.
yidianling
.
im
.
http
.
param
;
package
com
.
yidianling
.
im
.
api
.
param
;
//消息列表 全部已读
//消息列表 全部已读
public
class
ReadMsgAllParam
{
public
class
ReadMsgAllParam
{
...
...
m-im/src/main/
java/com/yidianling/im/http
/param/ReadParam.kt
→
m-im/src/main/
modular_api/com/yidianling/im/api
/param/ReadParam.kt
View file @
633f2c1b
File moved
m-im/src/main/
java/com/yidianling/im/http
/param/RmHistoryParam.java
→
m-im/src/main/
modular_api/com/yidianling/im/api
/param/RmHistoryParam.java
View file @
633f2c1b
package
com
.
yidianling
.
im
.
http
.
param
;
package
com
.
yidianling
.
im
.
api
.
param
;
public
class
RmHistoryParam
{
public
class
RmHistoryParam
{
public
String
toUid
;
//私聊对象
public
String
toUid
;
//私聊对象
...
...
m-im/src/main/
java/com/yidianling/im/http
/param/RmTalkParam.java
→
m-im/src/main/
modular_api/com/yidianling/im/api
/param/RmTalkParam.java
View file @
633f2c1b
package
com
.
yidianling
.
im
.
http
.
param
;
package
com
.
yidianling
.
im
.
api
.
param
;
public
class
RmTalkParam
{
public
class
RmTalkParam
{
...
...
m-im/src/main/
java/com/yidianling/im/http
/param/TopMessageParam.java
→
m-im/src/main/
modular_api/com/yidianling/im/api
/param/TopMessageParam.java
View file @
633f2c1b
package
com
.
yidianling
.
im
.
http
.
param
;
package
com
.
yidianling
.
im
.
api
.
param
;
public
class
TopMessageParam
{
public
class
TopMessageParam
{
...
...
m-im/src/main/modular_api/com/yidianling/im/api/service/IImService.kt
View file @
633f2c1b
package
com.yidianling.im.api.service
package
com.yidianling.im.api.service
import
android.app.Activity
import
android.app.Activity
import
android.app.Application
import
android.content.Context
import
android.content.Context
import
android.support.v4.app.Fragment
import
com.alibaba.android.arouter.facade.template.IProvider
import
com.alibaba.android.arouter.facade.template.IProvider
import
com.yidianling.im.api.bean.IMLoginInfo
import
com.yidianling.im.api.bean.IMLoginInfo
import
com.yidianling.im.api.bean.IMRequestCallback
import
com.yidianling.im.api.bean.IMRequestCallback
import
com.yidianling.im.api.listener.ApiStringResponseCallback
/**
/**
* author : Zhangwenchao
* author : Zhangwenchao
...
@@ -52,6 +55,8 @@ interface IImService : IProvider {
...
@@ -52,6 +55,8 @@ interface IImService : IProvider {
fun
startChat
(
context
:
Activity
,
toUid
:
String
,
flag
:
Int
,
canTalk
:
Int
)
fun
startChat
(
context
:
Activity
,
toUid
:
String
,
flag
:
Int
,
canTalk
:
Int
)
fun
startChat
(
context
:
Activity
,
toUid
:
String
,
flag
:
Int
,
canTalk
:
Int
,
isFramQingsu
:
Int
,
isFromMessageList
:
Boolean
)
/**
/**
* 根据对方uid获取未读数
* 根据对方uid获取未读数
*/
*/
...
@@ -62,4 +67,59 @@ interface IImService : IProvider {
...
@@ -62,4 +67,59 @@ interface IImService : IProvider {
* 获取自己的所有未读数
* 获取自己的所有未读数
*/
*/
fun
getAllUnReadNum
():
Int
fun
getAllUnReadNum
():
Int
fun
getMultiMessageFragment
():
Fragment
// 跳转下一个未读数
fun
nextUnreadItem
(
fragment
:
Fragment
):
Boolean
// 判断是否存在私聊页面
fun
isChatFragment
(
fragment
:
Fragment
):
Boolean
// 判断云信是否登录
fun
isImLogin
():
Boolean
// 刷新未读数
fun
requestTopUnReadNumber
(
fragment
:
Fragment
)
// 登录IM
fun
loginIm
(
uid
:
String
?,
hxPwd
:
String
?)
//注销
fun
logoutAll
()
// 初始化imcache
fun
initImCache
(
mContext
:
Context
)
// 客服
fun
startKefuChat
(
context
:
Context
,
toUid
:
String
,
flag
:
Int
,
canTalk
:
Int
)
//
fun
startP2PSession
(
mContext
:
Context
,
userType
:
Int
,
account
:
String
,
toChatUsername
:
String
,
toName
:
String
,
head
:
String
)
fun
updateUserHead
(
head
:
String
?)
fun
updateUserName
(
name
:
String
?)
fun
imInSetRing
(
bool
:
Boolean
)
fun
imInSetVibrate
(
bool
:
Boolean
)
fun
getUserInfoDescription
():
String
?
fun
getEarModeKey
():
String
fun
getEarModeOpenType
():
String
fun
getEarModeIsOpen
():
Boolean
fun
getEarModeCloseType
():
String
fun
updateEarMode
(
bool
:
Boolean
)
fun
getChatUid
(
context
:
Context
?,
uid
:
String
,
callback
:
ApiStringResponseCallback
)
fun
chatScheule
(
context
:
Activity
,
userUrl
:
String
,
docUrl
:
String
,
dsmId
:
Int
,
title
:
String
,
toUid
:
Int
)
fun
initIm
(
app
:
Application
,
activity
:
Class
<
out
Activity
>)
}
}
\ No newline at end of file
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
View file @
633f2c1b
...
@@ -1299,11 +1299,13 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
...
@@ -1299,11 +1299,13 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
safeTipView
.
updateVisibility
();
safeTipView
.
updateVisibility
();
}
}
if
(
h5Params
.
isShowMenu
())
{
if
(
h5Params
.
isShowMenu
())
{
if
(
WebModularServiceUtils
.
Companion
.
getImService
().
isHasUnread
())
{
try
{
tb_title
.
setImage_right
(
getResources
().
getDrawable
(
R
.
drawable
.
web_common_notice_more_en
));
if
(
WebModularServiceUtils
.
Companion
.
getImService
().
isHasUnread
())
{
}
else
{
tb_title
.
setImage_right
(
getResources
().
getDrawable
(
R
.
drawable
.
web_common_notice_more_en
));
tb_title
.
setImage_right
(
getResources
().
getDrawable
(
R
.
drawable
.
web_common_notice_more_un
));
}
else
{
}
tb_title
.
setImage_right
(
getResources
().
getDrawable
(
R
.
drawable
.
web_common_notice_more_un
));
}
}
catch
(
Exception
e
)
{}
}
}
if
(
backgroundView
.
getVisibility
()
==
View
.
VISIBLE
)
{
if
(
backgroundView
.
getVisibility
()
==
View
.
VISIBLE
)
{
backgroundView
.
setVisibility
(
View
.
GONE
);
backgroundView
.
setVisibility
(
View
.
GONE
);
...
...
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