Commit 783ec8b5 authored by fengruiyu's avatar fengruiyu

首页底部弹出框无数据问题

parent c070146e
...@@ -117,7 +117,7 @@ class HomeViewModel(application: Application) : BaseViewModel(application) { ...@@ -117,7 +117,7 @@ class HomeViewModel(application: Application) : BaseViewModel(application) {
while (bf.readLine().also { line = it } != null) { while (bf.readLine().also { line = it } != null) {
stringBuilder.append(line) stringBuilder.append(line)
} }
mapBean = Gson().fromJson(stringBuilder.toString(), MapBean::class.java)
if ( SPUtils.getInstance().decodeBoolean(HomeFragment.IS_FIRST_OPEN,true)){ if ( SPUtils.getInstance().decodeBoolean(HomeFragment.IS_FIRST_OPEN,true)){
mapbeanData.value = Gson().fromJson(stringBuilder.toString(), MapBean::class.java) mapbeanData.value = Gson().fromJson(stringBuilder.toString(), MapBean::class.java)
SPUtils.getInstance().encode(HomeFragment.IS_FIRST_OPEN,false) SPUtils.getInstance().encode(HomeFragment.IS_FIRST_OPEN,false)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment