pull/1303/head
gedoor 3 years ago
parent c93b133b1e
commit 663ed05ce1
  1. 16
      app/src/main/java/io/legado/app/ui/login/RuleUiLoginDialog.kt

@ -11,6 +11,7 @@ import androidx.core.view.setPadding
import androidx.fragment.app.activityViewModels import androidx.fragment.app.activityViewModels
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.BaseDialogFragment import io.legado.app.base.BaseDialogFragment
import io.legado.app.data.entities.BookSource
import io.legado.app.databinding.DialogLoginBinding import io.legado.app.databinding.DialogLoginBinding
import io.legado.app.lib.theme.primaryColor import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.widget.text.EditText import io.legado.app.ui.widget.text.EditText
@ -105,6 +106,14 @@ class RuleUiLoginDialog : BaseDialogFragment() {
} }
} }
} }
login(bookSource, loginData)
}
}
return@setOnMenuItemClickListener true
}
}
private fun login(bookSource: BookSource, loginData: HashMap<String, String>) {
launch(IO) { launch(IO) {
if (loginData.isEmpty()) { if (loginData.isEmpty()) {
bookSource.removeLoginInfo() bookSource.removeLoginInfo()
@ -125,13 +134,6 @@ class RuleUiLoginDialog : BaseDialogFragment() {
} }
} }
} }
}
}
}
return@setOnMenuItemClickListener true
} }
} }

Loading…
Cancel
Save