Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
P
PDF Viewer Scanner White ago
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kuxulei
PDF Viewer Scanner White ago
Commits
75219f68
Commit
75219f68
authored
Dec 27, 2024
by
周文华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修复】添加协程异常处理,尝试修复偶现的网络不好导致的数据问题
parent
e7d237e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
NewComUtils.kt
...java/com/base/pdfviewerscannerwhite/helper/NewComUtils.kt
+2
-1
No files found.
app/src/main/java/com/base/pdfviewerscannerwhite/helper/NewComUtils.kt
View file @
75219f68
...
...
@@ -8,6 +8,7 @@ import com.google.gson.Gson
import
com.google.gson.reflect.TypeToken
import
kotlinx.coroutines.CoroutineScope
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.SupervisorJob
import
kotlinx.coroutines.launch
import
kotlinx.coroutines.withContext
import
org.json.JSONObject
...
...
@@ -42,7 +43,7 @@ object NewComUtils {
fun
requestCfg
(
callback
:
()
->
Unit
)
{
CoroutineScope
(
Dispatchers
.
IO
).
launch
{
CoroutineScope
(
SupervisorJob
()
+
Dispatchers
.
IO
).
launch
{
val
response
=
doGet
()
if
(
response
==
null
)
{
withContext
(
Dispatchers
.
Main
)
{
...
...
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