Commit 4483c295 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Remove unneeded method to check if the hard keyboard is shown (we don't need it).

parent 396e1043
......@@ -43,22 +43,6 @@ class AuthenticationLoginFragment : Fragment() {
shouldShowSignUpMsgView(true)
}
override fun onConfigurationChanged(newConfig: Configuration?) {
super.onConfigurationChanged(newConfig)
if (KeyboardHelper.isHardKeyboardShown(newConfig)) {
shouldShowOauthView(false)
shouldShowSignUpMsgView(false)
shouldShowLoginButton(true)
} else {
if (isEditTextNullOrBlank()) {
shouldShowOauthView(true)
shouldShowSignUpMsgView(true)
shouldShowLoginButton(false)
}
}
}
private fun tintEditTextDrawableStart() {
val context = activity.applicationContext
......
package chat.rocket.android.app
import android.content.res.Configuration
import android.graphics.Rect
import android.view.View
......@@ -22,17 +21,4 @@ object KeyboardHelper {
val heightDiff = rootView.bottom - rect.bottom
return heightDiff > softKeyboardHeight * dm.density
}
/**
* Returns true if the hard keyboard is shown, false otherwise.
*
* @param newConfig The configuration.
* @return true if the hard keyboard is shown, false otherwise.
*/
fun isHardKeyboardShown(newConfig: Configuration?): Boolean {
if (newConfig?.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO) {
return true
}
return false
}
}
\ No newline at end of file
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