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