Commit ddf14c47 by 杨凯

Merge branch 'd/v4.4.06' into 'release'

D/v4.4.06

See merge request app_android_lib/YDL-Component!288
parents f2f0882b 67f3db0f
......@@ -14,7 +14,7 @@ buildscript {
ydlrouter_version = '1.2.3'
constrait_support_version = '1.0.2'
componentVersion = "0.3.0.12-SNAPSHOT"
componentVersion = "0.3.0.13"
}
repositories {
mavenCentral()
......
......@@ -54,7 +54,6 @@ import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import java.io.UnsupportedEncodingException
import java.net.URLDecoder
import java.util.*
import kotlin.math.roundToInt
class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
......@@ -97,6 +96,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
var shouldShow: Boolean? = false
var uid: String? = null
var listen_free: Boolean = false
private var hasOnResume = false
fun showBottomSheetDialog(
activity: FragmentActivity,
jumpUrl: String,
......@@ -367,6 +367,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
}
fun onEventMainThread(event: ConfideDialogEvent) {
if(!hasOnResume) return
// 第一位表示拨打按钮,第二位代表再换一位按钮
val show = event.show
// if (show == 0) {
......@@ -568,8 +569,14 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
return false
}
override fun onStop() {
super.onStop()
hasOnResume = false
}
override fun onResume() {
super.onResume()
hasOnResume = true
if (doctorId.isNotBlank() && layoutCall.visibility == View.VISIBLE) {
onLoadDialStatus(doctorId)
}
......
......@@ -218,23 +218,28 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
"$orderNum"
}
iv_order_tip.text = numberStr
getLocal().setConsult(orderNum)
getLocal().setConsult(true)
getLocal().setConsultNum(orderNum)
} else {
iv_order_tip.visibility = View.GONE
getLocal().setConsult(0)
getLocal().setConsult(false)
getLocal().setConsultNum(0)
}
}else{
}else {
getLocal().setConfide(false)
getLocal().setConsult(0)
getLocal().setConsult(false)
getLocal().setConsultNum(0)
}
}else{
}else {
getLocal().setConfide(false)
getLocal().setConsult(0)
getLocal().setConsult(false)
getLocal().setConsultNum(0)
}
},{
getLocal().setConfide(false)
getLocal().setConsult(0)
getLocal().setConsult(false)
getLocal().setConsultNum(0)
})
}
......@@ -246,7 +251,8 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
private fun refreshCouponData() {
getLocal().setCoupon(false)
getLocal().setConfide(false)
getLocal().setConsult(0)
getLocal().setConsult(false)
getLocal().setConsultNum(0)
val userInfo = getUserInfo()
......
......@@ -18,15 +18,19 @@ interface AppLocal {
fun putUpdate(update: Boolean)
fun getCoupon():Boolean
fun getCoupon(): Boolean
fun setCoupon(have:Boolean)
fun setCoupon(have: Boolean)
fun getConsult(): Int
fun getConsult(): Boolean
fun setConsult(have: Int)
fun setConsult(have: Boolean)
fun getConfide():Boolean
fun getConsultNum(): Int
fun setConsultNum(num: Int)
fun getConfide(): Boolean
fun setConfide(have: Boolean)
......
......@@ -22,6 +22,7 @@ internal class AppLocalImpl private constructor(): AppLocal {
private const val CONFIDE = "confide"
private const val CONSULT = "consult"
private const val CONSULT_NUM = "consult_num"
private const val COUPON = "coupon"
}
......@@ -50,12 +51,20 @@ internal class AppLocalImpl private constructor(): AppLocal {
getAppSP().edit().putBoolean(COUPON, have).apply()
}
override fun getConsult(): Int {
return getAppSP().getInt(CONSULT, 0)
override fun getConsult(): Boolean {
return getAppSP().getBoolean(CONSULT, false)
}
override fun setConsult(have: Int) {
getAppSP().edit().putInt(CONSULT, have).apply()
override fun setConsult(have: Boolean) {
getAppSP().edit().putBoolean(CONSULT, have).apply()
}
override fun getConsultNum(): Int {
return getAppSP().getInt(CONSULT_NUM, 0)
}
override fun setConsultNum(num: Int) {
getAppSP().edit().putInt(CONSULT_NUM, num).apply()
}
override fun getConfide(): Boolean {
......
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