|
|
|
@ -15,6 +15,7 @@ import androidx.core.content.ContextCompat
|
|
|
|
|
import androidx.core.view.isVisible
|
|
|
|
|
import androidx.lifecycle.MutableLiveData
|
|
|
|
|
import cn.jpush.android.api.JPushInterface
|
|
|
|
|
import com.hjq.toast.ToastUtils
|
|
|
|
|
import com.tamsiree.rxkit.RxTimeTool
|
|
|
|
|
import com.xty.base.fragment.BaseVmFrag
|
|
|
|
|
import com.xty.base.utils.UserInfoDefin
|
|
|
|
@ -467,10 +468,18 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
|
|
|
|
|
// 刷新注册
|
|
|
|
|
private fun refresh() {
|
|
|
|
|
refresh.setRefresh(binding.mRefresh) {
|
|
|
|
|
if(!TextUtils.isEmpty(showIdInfo)){
|
|
|
|
|
isJob = false
|
|
|
|
|
request()
|
|
|
|
|
}else{
|
|
|
|
|
ToastUtils.show(R.string.again_login)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// getXtInfo(showIdInfo)
|
|
|
|
|
// get24HourReportInfo(showIdInfo)
|
|
|
|
|
request()
|
|
|
|
|
|
|
|
|
|
// request()
|
|
|
|
|
// uploadWhatchData()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -485,9 +494,6 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
|
|
|
|
|
|
|
|
|
|
if(MMkvHelper.contains(Const.LATITUDE) && MMkvHelper.contains(Const.LONGITUDE)){
|
|
|
|
|
mViewModel.getWeather()
|
|
|
|
|
}else{
|
|
|
|
|
if (showIdInfo == ""){
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
if(EasyPermissions.hasPermissions(requireContext(), Manifest.permission.ACCESS_COARSE_LOCATION,
|
|
|
|
@ -525,7 +531,6 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -753,7 +758,6 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
|
|
|
|
|
functionList.addAll(it.data)
|
|
|
|
|
if (showIdInfo ==MMkvHelper.getLong(Const.USER_ID).toString()) {
|
|
|
|
|
Const.functionListDate.value = functionList
|
|
|
|
|
startUpdateHealthInfoLive()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -826,6 +830,10 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
|
|
|
|
|
} else if (YCBBlueConnectHelper.getBleNowStatus() == YCBBlueConnectHelper.BLEConnectState.Connected) {
|
|
|
|
|
getConnectStatus()
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
if(Const.watchType != -1 && !isDemonstrate){
|
|
|
|
|
startUpdateHealthInfoLive()
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -1238,7 +1246,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
|
|
|
|
|
|
|
|
|
|
private var mDisposable: Disposable? = null
|
|
|
|
|
fun startUpdateHealthInfoLive(){
|
|
|
|
|
LogUtils.e("DynamicManagementFrag","刷新数据 ${getHealthInfoJob} disposable:${mDisposable}")
|
|
|
|
|
LogUtils.e("DynamicManagementFrag","刷新数据 disposable:${mDisposable}")
|
|
|
|
|
|
|
|
|
|
if(mDisposable == null){
|
|
|
|
|
Observable.interval(1000 * 60,60*1000,TimeUnit.MILLISECONDS)
|
|
|
|
|