Skip to content

Commit

Permalink
Android: Disable debug controls
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-magda committed Jan 20, 2023
1 parent 28c469c commit 2aac90a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import androidx.lifecycle.ViewModelProvider
import androidx.transition.AutoTransition
import androidx.transition.TransitionManager
import by.kirich1409.viewbindingdelegate.viewBinding
import com.google.android.material.snackbar.Snackbar
import org.hyperskill.app.SharedResources
import org.hyperskill.app.android.HyperskillApp
import org.hyperskill.app.android.R
Expand Down Expand Up @@ -88,14 +87,14 @@ class HomeFragment :
}
}

viewBinding.homeOpenStepButton.setOnClickListener {
val stepId = viewBinding.homeOpenStepInputEditText.text.toString().toLongOrNull()
if (stepId == null) {
view.snackbar("Insert a valid number", Snackbar.LENGTH_SHORT)
} else {
requireRouter().navigateTo(StepScreen(StepRoute.Learn(stepId)))
}
}
// viewBinding.homeOpenStepButton.setOnClickListener {
// val stepId = viewBinding.homeOpenStepInputEditText.text.toString().toLongOrNull()
// if (stepId == null) {
// view.snackbar("Insert a valid number", Snackbar.LENGTH_SHORT)
// } else {
// requireRouter().navigateTo(StepScreen(StepRoute.Learn(stepId)))
// }
// }

homeViewModel.onNewMessage(HomeFeature.Message.Initialize(forceUpdate = false))
homeViewModel.onNewMessage(HomeFeature.Message.ViewedEventMessage)
Expand Down
4 changes: 2 additions & 2 deletions androidHyperskillApp/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
android:layout_marginTop="20dp"
android:hint="Enter step ID"
tools:ignore="HardcodedText"
android:visibility="visible"
android:visibility="gone"
>

<com.google.android.material.textfield.TextInputEditText
Expand All @@ -78,7 +78,7 @@
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/homeOpenStepInputLayout"
tools:ignore="HardcodedText"
android:visibility="visible"
android:visibility="gone"
/>

<com.google.android.material.button.MaterialButton
Expand Down

0 comments on commit 2aac90a

Please sign in to comment.