Browse Source

1.专业测评添加非空判断

王鹏鹏 1 year ago
parent
commit
2d5c835fbd

+ 9 - 9
mmse/src/main/java/com/yingyangfly/mmse/fragment/CountFragment.kt

@@ -508,7 +508,9 @@ class CountFragment : BaseFragment<FragmentCountBinding>(), View.OnTouchListener
                 if (v.id == R.id.btnPrevious) {
                     pageUp(v)
                 } else if (v.id == R.id.btnNext) {
-                    pageNext(v)
+                    if (judge()) {
+                        pageNext(v)
+                    }
                 }
             }
             MotionEvent.ACTION_CANCEL -> {
@@ -538,13 +540,11 @@ class CountFragment : BaseFragment<FragmentCountBinding>(), View.OnTouchListener
      * 下一页
      */
     private fun pageNext(v: View) {
-        if (judge()) {
-            val bundle = bundleOf("questionId" to 22)
-            val controller = Navigation.findNavController(v)
-            controller.navigate(
-                R.id.action_countFragment_to_recognitionImageFragment,
-                bundle
-            )
-        }
+        val bundle = bundleOf("questionId" to 22)
+        val controller = Navigation.findNavController(v)
+        controller.navigate(
+            R.id.action_countFragment_to_recognitionImageFragment,
+            bundle
+        )
     }
 }

+ 1 - 1
mmse/src/main/java/com/yingyangfly/mmse/fragment/RecognitionImageFragment.kt

@@ -158,7 +158,7 @@ class RecognitionImageFragment : BaseFragment<FragmentRecognitionImageBinding>()
                 bundle
             )
         } else {
-            val bundle = bundleOf("questionId" to 21)
+            val bundle = bundleOf("questionId" to 14)
             val controller = Navigation.findNavController(v)
             controller.navigate(
                 R.id.action_recognitionImageFragment_to_countFragment,