Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
pidan
/
FuSiLive
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d34e0e52
authored
Jan 16, 2025
by
pierce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决启动卡顿主线程的问题
parent
ce163296
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
Modules/FUSChatCenterModule/FUSChatCenterModule/Features/InstantMessaging/Other/FUSIMUserService.m
Modules/FUSChatCenterModule/FUSChatCenterModule/Features/InstantMessaging/Other/FUSIMUserService.m
View file @
d34e0e52
...
@@ -145,16 +145,17 @@
...
@@ -145,16 +145,17 @@
-
(
void
)
loginWithAccount
:
(
NSString
*
)
account
passWord
:
(
NSString
*
)
passWord
success
:
(
void
(
^
)(
void
))
success
failure
:
(
void
(
^
)(
NSString
*
errorMsg
))
failure
-
(
void
)
loginWithAccount
:
(
NSString
*
)
account
passWord
:
(
NSString
*
)
passWord
success
:
(
void
(
^
)(
void
))
success
failure
:
(
void
(
^
)(
NSString
*
errorMsg
))
failure
{
{
[[
EMClient
sharedClient
]
loginWithUsername
:
account
password
:
passWord
completion
:^
(
NSString
*
aUsername
,
EMError
*
aError
)
{
dispatch_async
(
dispatch_get_global_queue
(
0
,
0
),
^
{
if
(
!
aError
||
aError
.
code
==
200
)
{
[[
EMClient
sharedClient
]
loginWithUsername
:
account
password
:
passWord
completion
:^
(
NSString
*
aUsername
,
EMError
*
aError
)
{
if
(
!
aError
||
aError
.
code
==
200
)
{
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
@"refresh_hyLogin_state"
object
:
nil
];
if
(
success
)
success
();
if
(
success
)
success
();
}
else
{
}
else
{
if
(
failure
)
failure
(
aError
.
errorDescription
);
if
(
failure
)
failure
(
aError
.
errorDescription
);
[
self
uploadEaseMobLoginFailLogWithAccount
:
account
passWord
:
passWord
errorObj
:
aError
];
[
self
uploadEaseMobLoginFailLogWithAccount
:
account
passWord
:
passWord
errorObj
:
aError
];
}
}
}];
}];
});
}
}
-
(
void
)
fus_autoLoginWithAccount
:
(
NSString
*
)
account
-
(
void
)
fus_autoLoginWithAccount
:
(
NSString
*
)
account
...
@@ -166,6 +167,7 @@
...
@@ -166,6 +167,7 @@
[
self
loginWithAccount
:
account
passWord
:
_myUserPwd
success
:^
{
[
self
loginWithAccount
:
account
passWord
:
_myUserPwd
success
:^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
@"refresh_hyLogin_state"
object
:
nil
];
if
(
self
.
imLoginSucceedHandler
)
{
if
(
self
.
imLoginSucceedHandler
)
{
self
.
imLoginSucceedHandler
();
self
.
imLoginSucceedHandler
();
self
.
imLoginSucceedHandler
=
nil
;
self
.
imLoginSucceedHandler
=
nil
;
...
...
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