Skip to content

Commit

Permalink
fix: no need to hide the "show answer" button
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberButton authored and mikehardy committed Feb 16, 2024
1 parent 063efb8 commit 1750b30
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2312,8 +2312,6 @@ abstract class AbstractFlashcardViewer :
if (url.startsWith("typeblurtext:")) {
// Store the text the javascript has send us…
typeAnswer!!.input = decodeUrl(url.replaceFirst("typeblurtext:".toRegex(), ""))
// … and show the “SHOW ANSWER” button again.
flipCardLayout!!.visibility = View.VISIBLE
return true
}
if (url.startsWith("typeentertext:")) {
Expand All @@ -2333,12 +2331,7 @@ abstract class AbstractFlashcardViewer :
when (val signalOrdinal = WebViewSignalParserUtils.getSignalFromUrl(url)) {
WebViewSignalParserUtils.SIGNAL_UNHANDLED -> {}
WebViewSignalParserUtils.SIGNAL_NOOP -> return true
WebViewSignalParserUtils.TYPE_FOCUS -> {
// Hide the “SHOW ANSWER” button when the input has focus. The soft keyboard takes up enough
// space by itself.
flipCardLayout!!.visibility = View.GONE
return true
}
WebViewSignalParserUtils.TYPE_FOCUS -> return true

WebViewSignalParserUtils.RELINQUISH_FOCUS -> {
// #5811 - The WebView could be focused via mouse. Allow components to return focus to Android.
Expand Down

0 comments on commit 1750b30

Please sign in to comment.