[charter]
[bugfix] [fragment add log ]
This commit is contained in:
@@ -1025,6 +1025,7 @@ object CharterPassengerModel {
|
||||
broadcastList[requestSuccessSign] == null || broadcastList[requestSuccessSign] == false
|
||||
|
||||
fun cleanbroadcastListInfo(checkSite: SiteInfoResponse.SiteInfo?) {
|
||||
RxUtils.disposeSubscribe(switchLine5minWait)
|
||||
switchLine5minWait = RxUtils.createSubscribe(5 * 60 * 1000) {
|
||||
CallerLogger.d(M_BUS_P + BaseDPMsg.TAG, "5分钟倒计时可以选择线路了")
|
||||
}
|
||||
|
||||
@@ -134,6 +134,7 @@ class DebugViewWatchDogFragment :
|
||||
fun newInstance(): DebugViewWatchDogFragment {
|
||||
val args = Bundle()
|
||||
val fragment = DebugViewWatchDogFragment()
|
||||
CallerLogger.d(M_BUS_P + TAG, "创建新的Fragment")
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
@@ -158,13 +159,15 @@ class DebugViewWatchDogFragment :
|
||||
}
|
||||
if (debugViewWatchDogFragment != null) {
|
||||
if (debugViewWatchDogFragment.dialog != null && debugViewWatchDogFragment.dialog!!.isShowing) {
|
||||
CallerLogger.d(M_BUS_P + TAG, "正在展示")
|
||||
return
|
||||
}
|
||||
if (debugViewWatchDogFragment.isAdded) { //解决方法就是添加这行代码,如果已经添加了,就移除掉然后再show,就不会出现Fragment already added的错误了。
|
||||
parentFragmentManager.beginTransaction().remove(debugViewWatchDogFragment)
|
||||
.commitAllowingStateLoss()
|
||||
}
|
||||
if (ClickUtils.isFastClick()) {
|
||||
if (debugViewWatchDogFragment.isAdded) { //解决方法就是添加这行代码,如果已经添加了,就移除掉然后再show,就不会出现Fragment already added的错误了。
|
||||
parentFragmentManager.beginTransaction().remove(debugViewWatchDogFragment)
|
||||
.commitAllowingStateLoss()
|
||||
CallerLogger.d(M_BUS_P + TAG, "已经添加正在移除")
|
||||
}
|
||||
debugViewWatchDogFragment.show(parentFragmentManager, TAG)
|
||||
CallerLogger.d(M_BUS_P + TAG, "展示开关门")
|
||||
} else {
|
||||
|
||||
@@ -11,7 +11,6 @@ import androidx.fragment.app.FragmentTransaction
|
||||
import com.mogo.commons.mvp.MvpDialogFragment
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS_P
|
||||
import com.mogo.eagle.core.utilcode.util.AppStateManager
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils
|
||||
@@ -117,6 +116,7 @@ class M1CarUserNoOrderFragment :
|
||||
fun newInstance(): M1CarUserNoOrderFragment {
|
||||
val args = Bundle()
|
||||
val fragment = M1CarUserNoOrderFragment()
|
||||
CallerLogger.d(M_BUS_P + TAG, "创建新的Fragment")
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
@@ -143,13 +143,15 @@ class M1CarUserNoOrderFragment :
|
||||
}
|
||||
if (m1CarUserNoOrderFragment != null) {
|
||||
if (m1CarUserNoOrderFragment.dialog != null && m1CarUserNoOrderFragment.dialog!!.isShowing) {
|
||||
CallerLogger.d(M_BUS_P + TAG, "正在展示")
|
||||
return
|
||||
}
|
||||
if (m1CarUserNoOrderFragment.isAdded) { //解决方法就是添加这行代码,如果已经添加了,就移除掉然后再show,就不会出现Fragment already added的错误了。
|
||||
parentFragmentManager.beginTransaction().remove(m1CarUserNoOrderFragment)
|
||||
.commitAllowingStateLoss()
|
||||
}
|
||||
if (ClickUtils.isFastClick()) {
|
||||
if (m1CarUserNoOrderFragment.isAdded) { //解决方法就是添加这行代码,如果已经添加了,就移除掉然后再show,就不会出现Fragment already added的错误了。
|
||||
parentFragmentManager.beginTransaction().remove(m1CarUserNoOrderFragment)
|
||||
.commitAllowingStateLoss()
|
||||
CallerLogger.d(M_BUS_P + TAG, "已经添加正在移除")
|
||||
}
|
||||
m1CarUserNoOrderFragment.show(parentFragmentManager, TAG)
|
||||
VoiceManager.endOrder()
|
||||
CallerLogger.d(M_BUS_P + TAG, "展示开关门")
|
||||
|
||||
@@ -267,6 +267,7 @@ class M1ContainFragment :
|
||||
fun newInstance(): M1ContainFragment {
|
||||
val args = Bundle()
|
||||
val fragment = M1ContainFragment()
|
||||
CallerLogger.d(M_BUS_P + TAG, "创建新的Fragment")
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
@@ -278,7 +279,7 @@ class M1ContainFragment :
|
||||
bpFunctionGroup: M1ContainFragment?,
|
||||
tab: String
|
||||
) {
|
||||
val fragmentByTag: Fragment? = parentFragmentManager.findFragmentByTag(TAG)
|
||||
val fragmentByTag: Fragment? = childFragmentManager.findFragmentByTag(TAG)
|
||||
if (fragmentByTag is DialogFragment) {
|
||||
if (fragmentByTag.dialog != null && fragmentByTag.dialog!!.isShowing) {
|
||||
CallerLogger.d(M_BUS_P + TAG, "正在展示")
|
||||
@@ -294,16 +295,18 @@ class M1ContainFragment :
|
||||
bpFunctionGroup?.arguments?.putString(SELECTTAB, tab)
|
||||
if (bpFunctionGroup != null) {
|
||||
if (bpFunctionGroup.dialog != null && bpFunctionGroup.dialog!!.isShowing) {
|
||||
CallerLogger.d(M_BUS_P + DebugViewWatchDogFragment.TAG, "正在展示")
|
||||
return
|
||||
}
|
||||
if (bpFunctionGroup.isAdded) {
|
||||
//解决方法就是添加这行代码,如果已经添加了,就移除掉然后再show,就不会出现Fragment already added的错误了。
|
||||
parentFragmentManager.beginTransaction().remove(bpFunctionGroup)
|
||||
.commitNow()
|
||||
}
|
||||
if (ClickUtils.isFastClick()) {
|
||||
if (bpFunctionGroup.isAdded) {
|
||||
//解决方法就是添加这行代码,如果已经添加了,就移除掉然后再show,就不会出现Fragment already added的错误了。
|
||||
parentFragmentManager.beginTransaction().remove(bpFunctionGroup)
|
||||
.commitNowAllowingStateLoss()
|
||||
CallerLogger.d(M_BUS_P + DebugViewWatchDogFragment.TAG, "已经添加正在移除")
|
||||
}
|
||||
bpFunctionGroup.show(parentFragmentManager, TAG)
|
||||
CallerLogger.d(M_BUS_P + TAG, "展示$tab")
|
||||
CallerLogger.d(M_BUS_P + TAG, "展示$tab---$bpFunctionGroup")
|
||||
} else {
|
||||
CallerLogger.d(M_BUS_P + TAG, "dialog 1s内执行一次")
|
||||
}
|
||||
|
||||
@@ -309,6 +309,7 @@ class NoviceGuidanceFragment :
|
||||
fun newInstance(): NoviceGuidanceFragment {
|
||||
val args = Bundle()
|
||||
val fragment = NoviceGuidanceFragment()
|
||||
CallerLogger.d(M_BUS_P + TAG, "创建新的Fragment")
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
@@ -319,8 +320,7 @@ class NoviceGuidanceFragment :
|
||||
parentFragmentManager: FragmentManager,
|
||||
bpFunctionGroup: NoviceGuidanceFragment?,
|
||||
) {
|
||||
val fragmentByTag: Fragment? =
|
||||
parentFragmentManager.findFragmentByTag(TAG)
|
||||
val fragmentByTag: Fragment? = childFragmentManager.findFragmentByTag(TAG)
|
||||
if (fragmentByTag is DialogFragment) {
|
||||
if (fragmentByTag.dialog != null && fragmentByTag.dialog!!.isShowing) {
|
||||
CallerLogger.d(M_BUS_P + TAG, "正在展示")
|
||||
@@ -335,14 +335,16 @@ class NoviceGuidanceFragment :
|
||||
}
|
||||
if (bpFunctionGroup != null) {
|
||||
if (bpFunctionGroup.dialog != null && bpFunctionGroup.dialog!!.isShowing) {
|
||||
CallerLogger.d(M_BUS_P + TAG, "正在展示")
|
||||
return
|
||||
}
|
||||
if (bpFunctionGroup.isAdded) {
|
||||
//解决方法就是添加这行代码,如果已经添加了,就移除掉然后再show,就不会出现Fragment already added的错误了。
|
||||
parentFragmentManager.beginTransaction().remove(bpFunctionGroup)
|
||||
.commitAllowingStateLoss()
|
||||
}
|
||||
if (ClickUtils.isFastClick()) {
|
||||
if (bpFunctionGroup.isAdded) {
|
||||
//解决方法就是添加这行代码,如果已经添加了,就移除掉然后再show,就不会出现Fragment already added的错误了。
|
||||
parentFragmentManager.beginTransaction().remove(bpFunctionGroup)
|
||||
.commitAllowingStateLoss()
|
||||
CallerLogger.d(M_BUS_P + TAG, "已经添加正在移除")
|
||||
}
|
||||
bpFunctionGroup.show(parentFragmentManager, TAG)
|
||||
CallerLogger.d(M_BUS_P + TAG, "展示")
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user