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
fcb72e11
Commit
fcb72e11
authored
May 07, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/new_dev_4.3.91' into 心事动态发布优化
# Conflicts: # config.gradle
parents
be0e0655
a4de45ff
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
131 additions
and
39 deletions
+131
-39
config.gradle
config.gradle
+12
-12
ConfideHomeActivity.kt
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
+13
-15
ConfideHomeAdapter.kt
m-confide/src/main/java/com/ydl/confide/home/adapter/ConfideHomeAdapter.kt
+1
-1
readme.md
m-confide/src/main/java/com/ydl/confide/home/readme.md
+0
-2
ConfideHomeUtils.kt
m-confide/src/main/java/com/ydl/confide/home/util/ConfideHomeUtils.kt
+1
-1
NimApplication.java
m-im/src/main/java/com/yidianling/im/config/NimApplication.java
+34
-0
InputPanel.java
m-im/src/main/java/com/yidianling/uikit/business/session/module/input/InputPanel.java
+68
-2
NewH5Activity.java
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
+2
-6
No files found.
config.gradle
View file @
fcb72e11
...
...
@@ -5,13 +5,13 @@ ext {
ydlPublishVersion
=
[
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.49.
69
"
,
"m-consultant"
:
"0.0.60.2
0
"
,
"m-confide"
:
"0.0.49.
72
"
,
"m-consultant"
:
"0.0.60.2
1
"
,
"m-fm"
:
"0.0.30.08"
,
"m-user"
:
"0.0.62.04"
,
"m-home"
:
"0.0.23.3
6
"
,
"m-home"
:
"0.0.23.3
7
"
,
"m-im"
:
"0.0.21.30"
,
"m-dynamic"
:
"0.0.7.3
5
"
,
"m-dynamic"
:
"0.0.7.3
6
"
,
"m-article"
:
"0.0.0.10"
,
"m-muse"
:
"0.0.28.28"
,
...
...
@@ -38,10 +38,10 @@ ext {
"ydl-platform"
:
"0.0.40.98"
,
//第二步 若干
"ydl-webview"
:
"0.0.38.6
1
"
,
"ydl-webview"
:
"0.0.38.6
2
"
,
"ydl-media"
:
"0.0.21.44"
,
"ydl-pay"
:
"0.0.18.19"
,
"m-audioim"
:
"0.0.49.29.8
5
"
,
"m-audioim"
:
"0.0.49.29.8
8
"
,
"ydl-flutter-base"
:
"0.0.14.38"
,
//以下 几乎不会动
...
...
@@ -91,13 +91,13 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.49.
69
"
,
"m-consultant"
:
"0.0.60.2
0
"
,
"m-confide"
:
"0.0.49.
72
"
,
"m-consultant"
:
"0.0.60.2
1
"
,
"m-fm"
:
"0.0.30.08"
,
"m-user"
:
"0.0.62.04"
,
"m-home"
:
"0.0.23.3
6
"
,
"m-home"
:
"0.0.23.3
7
"
,
"m-im"
:
"0.0.21.30"
,
"m-dynamic"
:
"0.0.7.3
5
"
,
"m-dynamic"
:
"0.0.7.3
6
"
,
"m-article"
:
"0.0.0.8"
,
"m-muse"
:
"0.0.28.28"
,
...
...
@@ -122,10 +122,10 @@ ext {
"ydl-platform"
:
"0.0.40.98"
,
//第二步 若干
"ydl-webview"
:
"0.0.38.6
1
"
,
"ydl-webview"
:
"0.0.38.6
2
"
,
"ydl-media"
:
"0.0.21.44"
,
"ydl-pay"
:
"0.0.18.19"
,
"m-audioim"
:
"0.0.49.29.8
5
"
,
"m-audioim"
:
"0.0.49.29.8
8
"
,
"ydl-flutter-base"
:
"0.0.14.38"
,
//以下 几乎不会动
...
...
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
View file @
fcb72e11
package
com.ydl.confide.home
import
android.annotation.SuppressLint
import
android.content.Context
import
android.os.Build
import
android.view.View
...
...
@@ -331,7 +332,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
//数据重组
ConfideHomeUtils
.
resetData
(
cacheList
!!
,
v_filterView
,
listScrollListener
!!
)
setHideFilterView
()
mConfideAdapter
?.
updat
a
Items
(
cacheList
!!
)
mConfideAdapter
?.
updat
e
Items
(
cacheList
!!
)
mConfideAdapter
?.
notifyDataSetChanged
()
rv_list
.
refreshComplete
()
}
...
...
@@ -340,7 +341,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
* 更新适配器数据(用于播放 暂停 状态切换 更新整体数据)
*/
private
fun
updateAdapterForPlayStatus
()
{
mConfideAdapter
!!
.
updat
a
Items
(
cacheList
!!
)
mConfideAdapter
!!
.
updat
e
Items
(
cacheList
!!
)
mConfideAdapter
!!
.
notifyDataSetChanged
()
}
...
...
@@ -425,6 +426,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
*/
override
fun
recommendListMoreResponse
(
bean
:
ConfideHomeDataBean
)
{
dismissProgressDialog
()
rv_list
.
loadMoreComplete
()
bean
.
recommendId
=
page
if
(
bean
.
body
?.
size
?:
0
==
0
)
{
rv_list
.
loadMoreComplete
()
...
...
@@ -432,14 +434,8 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
return
}
(
cacheList
as
ArrayList
).
add
(
bean
)
va
r
size
=
mConfideAdapter
!!
.
itemCount
va
l
size
=
mConfideAdapter
!!
.
itemCount
mConfideAdapter
!!
.
addItems
(
ConfideHomeUtils
.
getRecommendList
(
bean
))
// if (bean?.body == null || bean.body!!.size < 10) {
// rv_list.setNoMore(true)
// } else {
rv_list
.
loadMoreComplete
()
// }
mConfideAdapter
!!
.
notifyItemInserted
(
if
(
size
>
0
)
size
+
1
else
0
)
}
...
...
@@ -448,13 +444,14 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
*/
override
fun
recommendListResponse
(
bean
:
ConfideHomeDataBean
)
{
dismissProgressDialog
()
updateCacheDataByRecommend
(
bean
)
mConfideAdapter
!!
.
updataItems
(
cacheList
!!
)
if
(
bean
?.
body
==
null
||
bean
.
body
!!
.
size
<
10
)
{
rv_list
.
setNoMore
(
true
)
}
else
{
rv_list
.
loadMoreComplete
()
}
updateCacheDataByRecommend
(
bean
)
mConfideAdapter
!!
.
updateItems
(
cacheList
!!
)
// if (bean.body == null || bean.body.size < 10) {
// rv_list.setNoMore(true)
// } else {
// rv_list.loadMoreComplete()
// }
mConfideAdapter
!!
.
notifyDataSetChanged
()
}
...
...
@@ -532,6 +529,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
}
}
@SuppressLint
(
"MissingSuperCall"
)
override
fun
onDestroy
()
{
super
.
onDestroy
()
mConfideEvent
!!
.
destoryPlayer
()
...
...
m-confide/src/main/java/com/ydl/confide/home/adapter/ConfideHomeAdapter.kt
View file @
fcb72e11
...
...
@@ -43,7 +43,7 @@ class ConfideHomeAdapter(private val mContext: Context,
return
mListData
!!
[
position
].
type
!!
}
fun
updat
a
Items
(
list
:
List
<
ConfideHomeDataBean
>)
{
fun
updat
e
Items
(
list
:
List
<
ConfideHomeDataBean
>)
{
if
(
null
==
mListData
||
mListData
!!
.
isEmpty
())
{
mListData
=
ArrayList
()
}
else
{
...
...
m-confide/src/main/java/com/ydl/confide/home/readme.md
deleted
100644 → 0
View file @
be0e0655
倾诉首页界面
\ No newline at end of file
m-confide/src/main/java/com/ydl/confide/home/util/ConfideHomeUtils.kt
View file @
fcb72e11
...
...
@@ -118,7 +118,7 @@ class ConfideHomeUtils {
*/
fun
getRecommendList
(
dataBean
:
ConfideHomeDataBean
):
MutableList
<
ConfideHomeDataBean
>
{
var
list
:
MutableList
<
ConfideHomeDataBean
>
=
ArrayList
()
if
(
null
==
dataBean
||
null
==
dataBean
.
body
||
dataBean
.
body
.
isEmpty
())
{
if
(
dataBean
.
body
==
null
||
dataBean
.
body
.
isEmpty
())
{
return
list
}
for
(
bodyBean
in
dataBean
.
body
)
{
...
...
m-im/src/main/java/com/yidianling/im/config/NimApplication.java
View file @
fcb72e11
...
...
@@ -2,9 +2,15 @@ package com.yidianling.im.config;
import
android.app.Application
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.net.Uri
;
import
android.util.Log
;
import
com.alibaba.fastjson.JSON
;
import
com.netease.nimlib.sdk.NIMClient
;
import
com.netease.nimlib.sdk.auth.LoginInfo
;
import
com.netease.nimlib.sdk.mixpush.MixPushMessageHandler
;
import
com.netease.nimlib.sdk.mixpush.NIMPushClient
;
import
com.netease.nimlib.sdk.uinfo.model.UserInfo
;
import
com.netease.nimlib.sdk.util.NIMUtil
;
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
;
...
...
@@ -28,6 +34,8 @@ import com.yidianling.uikit.business.uinfo.UserInfoHelper;
import
com.yidianling.uikit.custom.config.YDLToolBarOptions
;
import
com.yidianling.user.api.bean.UserResponseBean
;
import
java.util.Map
;
import
de.greenrobot.event.EventBus
;
...
...
@@ -67,6 +75,32 @@ public class NimApplication {
ImObserversHelper
.
Companion
.
getInstance
().
registerObserver
(
true
);
// 初始化听筒模式
initEarMode
();
NIMPushClient
.
registerMixPushMessageHandler
(
new
MixPushMessageHandler
()
{
@Override
public
boolean
onNotificationClicked
(
Context
context
,
Map
<
String
,
String
>
map
)
{
Log
.
d
(
"notification"
,
JSON
.
toJSONString
(
map
));
String
routeAndroid
=
map
.
get
(
"route_android"
);
if
(
routeAndroid
!=
null
)
{
try
{
Intent
intent
=
new
Intent
(
Intent
.
ACTION_VIEW
);
intent
.
setPackage
(
context
.
getPackageName
());
intent
.
setData
(
Uri
.
parse
(
routeAndroid
));
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_CLEAR_TOP
);
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
context
.
startActivity
(
intent
);
return
true
;
}
catch
(
Throwable
e
)
{
Log
.
e
(
"app"
,
""
,
e
);
}
}
return
false
;
}
@Override
public
boolean
cleanMixPushNotifications
(
int
i
)
{
return
false
;
}
});
}
}
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/module/input/InputPanel.java
View file @
fcb72e11
...
...
@@ -5,6 +5,7 @@ import android.app.Activity;
import
android.content.Context
;
import
android.content.Intent
;
import
android.graphics.drawable.Drawable
;
import
android.net.Uri
;
import
android.os.Handler
;
import
android.os.SystemClock
;
import
android.text.Editable
;
...
...
@@ -30,9 +31,9 @@ import androidx.constraintlayout.widget.ConstraintLayout;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
com.alibaba.fastjson.JSONException
;
import
com.alibaba.fastjson.JSONObject
;
import
com.blankj.utilcode.util.SPUtils
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.netease.nimlib.sdk.NIMClient
;
import
com.netease.nimlib.sdk.media.record.AudioRecorder
;
import
com.netease.nimlib.sdk.media.record.IAudioRecordCallback
;
...
...
@@ -72,7 +73,9 @@ import com.yidianling.user.api.service.IUserService;
import
java.io.File
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
de.greenrobot.event.EventBus
;
import
io.reactivex.functions.Consumer
;
...
...
@@ -645,7 +648,70 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
}
protected
IMMessage
createTextMessage
(
String
text
)
{
return
MessageBuilder
.
createTextMessage
(
container
.
account
,
container
.
sessionType
,
text
);
IMMessage
msg
=
MessageBuilder
.
createTextMessage
(
container
.
account
,
container
.
sessionType
,
text
);
Map
<
String
,
Object
>
payload
=
new
HashMap
<>();
fillHwPayload
(
payload
,
NimUIKit
.
getAccount
(),
container
.
sessionType
.
getValue
());
fillOppoPayload
(
payload
,
NimUIKit
.
getAccount
(),
container
.
sessionType
.
getValue
());
fillVivoPayload
(
payload
,
NimUIKit
.
getAccount
(),
container
.
sessionType
.
getValue
());
payload
.
put
(
"sessionId"
,
NimUIKit
.
getAccount
());
payload
.
put
(
"sessionType"
,
container
.
sessionType
.
getValue
());
msg
.
setPushPayload
(
payload
);
return
msg
;
}
private
void
fillHwPayload
(
Map
<
String
,
Object
>
pushPayload
,
String
sessionId
,
int
sessionType
)
{
//华为
Intent
hwIntent
=
new
Intent
(
Intent
.
ACTION_VIEW
);
String
intentStr
=
String
.
format
(
"im://ydl.com/session?sessionId=%s&sessionType=%s"
,
sessionId
,
// 发送者的account 或 群聊id
sessionType
// 类型(单聊或群聊)
);
hwIntent
.
setData
(
Uri
.
parse
(
intentStr
));
hwIntent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_CLEAR_TOP
);
String
intentUri
=
hwIntent
.
toUri
(
Intent
.
URI_INTENT_SCHEME
);
//点击事件的内容
JSONObject
clickAction
=
new
JSONObject
();
//通知的内容
JSONObject
notification
=
new
JSONObject
();
try
{
clickAction
.
fluentPut
(
"type"
,
1
)
.
put
(
"intent"
,
intentUri
);
notification
.
put
(
"click_action"
,
clickAction
);
pushPayload
.
put
(
"hwField"
,
notification
);
}
catch
(
JSONException
e
)
{
e
.
printStackTrace
();
}
}
private
void
fillVivoPayload
(
Map
<
String
,
Object
>
pushPayload
,
String
sessionId
,
int
sessionType
)
{
Map
<
String
,
Object
>
vivoField
=
new
HashMap
<>();
vivoField
.
put
(
"classification"
,
1
);
vivoField
.
put
(
"skipType"
,
3
);
Intent
intent
=
new
Intent
(
Intent
.
ACTION_VIEW
);
String
intentStr
=
String
.
format
(
"im://ydl.com/session?sessionId=%s&sessionType=%s"
,
sessionId
,
// 发送者的account 或 群聊id
sessionType
// 类型(单聊或群聊)
);
intent
.
setData
(
Uri
.
parse
(
intentStr
));
String
intentUri
=
intent
.
toUri
(
Intent
.
URI_INTENT_SCHEME
);
vivoField
.
put
(
"skipContent"
,
intentUri
);
pushPayload
.
put
(
"vivoField"
,
vivoField
);
}
private
void
fillOppoPayload
(
Map
<
String
,
Object
>
pushPayload
,
String
sessionId
,
int
sessionType
)
{
Map
<
String
,
Object
>
oppoField
=
new
HashMap
<>();
String
intentStr
=
String
.
format
(
"im://ydl.com/session?sessionId=%s&sessionType=%s"
,
sessionId
,
// 发送者的account 或 群聊id
sessionType
// 类型(单聊或群聊)
);
oppoField
.
put
(
"click_action_type"
,
5
);
oppoField
.
put
(
"click_action_url"
,
intentStr
);
oppoField
.
put
(
"channel_id"
,
"nim_message_channel_001"
);
pushPayload
.
put
(
"oppoField"
,
oppoField
);
}
/**
...
...
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
View file @
fcb72e11
...
...
@@ -1018,12 +1018,8 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
handler
.
proceed
();
return
;
}
final
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
);
builder
.
setMessage
(
R
.
string
.
platform_notification_error_ssl_cert_invalid
);
builder
.
setPositiveButton
(
"继续"
,
(
dialog
,
which
)
->
handler
.
proceed
());
builder
.
setNegativeButton
(
"取消"
,
(
dialog
,
which
)
->
handler
.
cancel
());
final
AlertDialog
dialog
=
builder
.
create
();
dialog
.
show
();
ToastUtil
.
toastShort
(
"SSL 证书验证错误"
);
handler
.
cancel
();
}
private
void
initShareMenu
()
{
...
...
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