Skip to content

Commit 3b2f868

Browse files
committed
添加搜索仓库和搜索用户排序功能
1 parent df9e523 commit 3b2f868

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/src/main/java/com/fmt/github/home/activity/CommonSearchActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class CommonSearchActivity : BaseDataBindActivity<ActivityCommonSearchBinding>()
9797

9898
private fun searchReposOrUsers() {
9999
mSearchReposModel.searchKey.get()?.apply {
100-
this.isNullOrEmpty().yes {
100+
this.isEmpty().yes {
101101
warningToast(R.string.please_enter_search_keywords)
102102
}.otherwise {
103103
mSortTv.visibility = View.VISIBLE

app/src/main/java/com/fmt/github/user/activity/LoginActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ class LoginActivity : BaseDataBindVMActivity<ActivityLoginBinding>() {
4444
private fun login() {
4545
val username = mUserLoginModel.username.get().toString()
4646
val password = mUserLoginModel.password.get().toString()
47-
username.isNullOrEmpty().yes {
47+
username.isEmpty().yes {
4848
mUserNameInputLayout.error = getString(R.string.username_not_null)
4949
mUserNameInputLayout.isErrorEnabled = true
5050
}.otherwise {
5151
mUserNameInputLayout.isErrorEnabled = false
52-
password.isNullOrEmpty().yes {
52+
password.isEmpty().yes {
5353
mPasswordInputLayout.error = getString(R.string.password_not_null)
5454
mPasswordInputLayout.isErrorEnabled = true
5555
}.otherwise {

0 commit comments

Comments
 (0)