修复家和公司的问题

This commit is contained in:
zhangyuanzhen
2020-04-02 13:03:16 +08:00
parent 818b4222cf
commit 81e7536f6f
3 changed files with 40 additions and 5 deletions

View File

@@ -15,10 +15,12 @@ import com.mogo.module.navi.R
import com.mogo.module.navi.bean.SearchPoi
import com.mogo.module.navi.constants.DataConstants
import com.mogo.module.navi.constants.SearchServiceHolder
import com.mogo.module.navi.cp.AddressHelper
import com.mogo.module.navi.manager.AddressManager
import com.mogo.module.navi.manager.SettingManager
import com.mogo.module.navi.manager.VolumeManager
import com.mogo.module.navi.ui.base.BaseFragment
import com.mogo.utils.UiThreadHandler
import kotlinx.android.synthetic.main.fragment_navi_setting.*
import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
@@ -297,6 +299,10 @@ class NaviSettingFragment : BaseFragment(), OnCheckedChangeListener {
tv_navi_clear_home_address.visibility = View.VISIBLE
}
UiThreadHandler.postDelayed(Runnable {
AddressHelper.notifyAddressChanged(activity, searchPoi)
}, 100)
}
override fun onDestroyView() {

View File

@@ -183,12 +183,12 @@ class SettingAddressFragment : BaseFragment(), IMogoGeoSearchListener {
AppDataBase.getDatabase(context)
.poiDao()
.insert(searchPoi)
AddressHelper.notifyAddressChanged(context, searchPoi)
})
.subscribeOn(Schedulers.io())
.subscribe()
}
override fun onDestroyView() {