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
9624fcf8
Commit
9624fcf8
authored
Apr 24, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:删除聊天记录
parent
87528e41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
19 deletions
+3
-19
YDLTeamMessageFragment.java
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLTeamMessageFragment.java
+3
-19
No files found.
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLTeamMessageFragment.java
View file @
9624fcf8
...
...
@@ -208,25 +208,9 @@ public class YDLTeamMessageFragment extends YDLMessageFragment {
dialog
.
setCancelAble
(
true
);
dialog
.
setLeftOnclick
(
"再考虑下"
,
v
->
dialog
.
dismiss
());
dialog
.
setRightClick
(
"立即删除"
,
v
->
{
LoadingDialogFragment
loadingDialog
=
LoadingDialogFragment
.
Companion
.
newInstance
(
"正在删除"
);
loadingDialog
.
show
(((
AppCompatActivity
)
getContext
()).
getSupportFragmentManager
(),
null
);
RemoveHistory
cmd
=
new
RemoveHistory
();
cmd
.
toUid
=
team
.
getId
();
cmd
.
type
=
1
;
Disposable
disposable
=
ImRetrofitApi
.
Companion
.
getImRetrofitApi
().
rmHistory
(
NetworkParamsUtils
.
getMaps
(
cmd
))
.
subscribeOn
(
Schedulers
.
io
())
.
compose
(
RxUtils
.
INSTANCE
.
resultData
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
objectBaseResponse
->
{
loadingDialog
.
hide
();
ToastUtil
.
toastShort
(
"聊天记录已删除"
);
NIMClient
.
getService
(
MsgService
.
class
).
clearChattingHistory
(
cmd
.
toUid
,
SessionTypeEnum
.
P2P
);
MessageListPanelHelper
.
getInstance
().
notifyClearMessages
(
cmd
.
toUid
);
},
throwable
->
{
loadingDialog
.
hide
();
HttpErrorUtils
.
Companion
.
handleError
(
getContext
(),
throwable
);
});
ToastUtil
.
toastShort
(
"聊天记录已删除"
);
NIMClient
.
getService
(
MsgService
.
class
).
clearServerHistory
(
team
.
getId
(),
SessionTypeEnum
.
Team
);
MessageListPanelHelper
.
getInstance
().
notifyClearMessages
(
team
.
getId
());
});
dialog
.
show
();
}
...
...
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