Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_freeworld
Project
Project
Details
Activity
Releases
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
android
android_freeworld
Commits
894325ec
Commit
894325ec
authored
Aug 03, 2021
by
fengruiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改问题首次推荐的问题
parent
4fb3c46b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
HomeViewModel.kt
...src/main/java/com/mints/street/main/home/HomeViewModel.kt
+6
-2
No files found.
app/src/main/java/com/mints/street/main/home/HomeViewModel.kt
View file @
894325ec
...
...
@@ -19,6 +19,7 @@ import com.mints.street.webview.MintsWebViewActivity
import
me.goldze.mvvmhabit.base.AppManager
import
me.goldze.mvvmhabit.base.BaseViewModel
import
me.goldze.mvvmhabit.utils.KLog
import
me.goldze.mvvmhabit.utils.SPUtils
import
me.tatarka.bindingcollectionadapter2.ItemBinding
import
java.io.BufferedReader
import
java.io.InputStreamReader
...
...
@@ -116,8 +117,11 @@ class HomeViewModel(application: Application) : BaseViewModel(application) {
while
(
bf
.
readLine
().
also
{
line
=
it
}
!=
null
)
{
stringBuilder
.
append
(
line
)
}
if
(
SPUtils
.
getInstance
().
decodeBoolean
(
HomeFragment
.
IS_FIRST_OPEN
,
true
)){
mapbeanData
.
value
=
Gson
().
fromJson
(
stringBuilder
.
toString
(),
MapBean
::
class
.
java
)
mapBean
=
Gson
().
fromJson
(
stringBuilder
.
toString
(),
MapBean
::
class
.
java
)
SPUtils
.
getInstance
().
encode
(
HomeFragment
.
IS_FIRST_OPEN
,
false
)
}
}
catch
(
e
:
Exception
)
{
KLog
.
e
(
"读取assets文件下的json出问题"
)
...
...
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