Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ethan
/
appframe
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit b222d1e3
authored
2026-08-11 14:11:51 +0800
by
ethanlamzs
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
关于im登陆强制刷新都能加入到推送到分组上
1 parent
decaf318
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
lib/bloc/web_cubit.dart
lib/services/im_service.dart
lib/bloc/web_cubit.dart
View file @
b222d1e
...
@@ -467,9 +467,9 @@ class WebCubit extends Cubit<WebState> with WidgetsBindingObserver {
...
@@ -467,9 +467,9 @@ class WebCubit extends Cubit<WebState> with WidgetsBindingObserver {
// 注册推送服务
// 注册推送服务
imService
.
registerPush
();
imService
.
registerPush
();
// 处理加群和退群
// 处理加群和退群
if
(
state
.
loginOpFlag
)
{
//
if (state.loginOpFlag) {
imService
.
joinAndLeaveGroup
(
state
.
userCode
!);
imService
.
joinAndLeaveGroup
(
state
.
userCode
!);
}
//
}
}
else
{
}
else
{
debugPrint
(
"缓存自动登录处,IM 登录失败"
);
debugPrint
(
"缓存自动登录处,IM 登录失败"
);
}
}
...
...
lib/services/im_service.dart
View file @
b222d1e
...
@@ -345,9 +345,10 @@ class ImService {
...
@@ -345,9 +345,10 @@ class ImService {
// 需要加群
// 需要加群
for
(
var
classId
in
classIdList
)
{
for
(
var
classId
in
classIdList
)
{
if
(!
joinedGroupIdList
.
contains
(
classId
))
{
// 改变策略,强制加入
//if (!joinedGroupIdList.contains(classId)) {
unjoinedGroupIdList
.
add
(
classId
);
unjoinedGroupIdList
.
add
(
classId
);
}
//
}
}
}
// 需要退群
// 需要退群
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment