fix: 修复几个 Bug
This commit is contained in:
parent
cf72667290
commit
dbd885fb9c
|
|
@ -62,12 +62,13 @@ class LoginActivity : BaseActivity(), WebViewListener {
|
||||||
snackBar.show()
|
snackBar.show()
|
||||||
launch {
|
launch {
|
||||||
AccountUtil.fetchAccountFlow(bduss, sToken, cookies)
|
AccountUtil.fetchAccountFlow(bduss, sToken, cookies)
|
||||||
|
.flowOn(Dispatchers.IO)
|
||||||
.catch { e ->
|
.catch { e ->
|
||||||
snackBar.setText("登录失败 ${e.getErrorMessage()}")
|
snackBar.setText("登录失败 ${e.getErrorMessage()}")
|
||||||
view.loadUrl("https://wappass.baidu.com/passport?login&u=https%3A%2F%2Ftieba.baidu.com%2Findex%2Ftbwise%2Fmine")
|
view.loadUrl("https://wappass.baidu.com/passport?login&u=https%3A%2F%2Ftieba.baidu.com%2Findex%2Ftbwise%2Fmine")
|
||||||
handler.postDelayed({ snackBar.dismiss() }, 1500)
|
handler.postDelayed({ snackBar.dismiss() }, 1500)
|
||||||
}
|
}
|
||||||
.flowOn(Dispatchers.IO)
|
.flowOn(Dispatchers.Main)
|
||||||
.collect { account ->
|
.collect { account ->
|
||||||
AccountUtil.newAccount(account.uid, account) {
|
AccountUtil.newAccount(account.uid, account) {
|
||||||
if (it) {
|
if (it) {
|
||||||
|
|
|
||||||
|
|
@ -756,7 +756,8 @@ class ThreadActivity : BaseActivity(), View.OnClickListener, IThreadMenuFragment
|
||||||
show(supportFragmentManager, "Menu")
|
show(supportFragmentManager, "Menu")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
R.id.thread_bottom_bar_agree -> if (dataBean != null && dataBean!!.thread != null) {
|
|
||||||
|
R.id.thread_bottom_bar_agree -> if (dataBean?.thread?.threadInfo?.threadId != null && dataBean?.thread?.threadInfo?.firstPostId != null) {
|
||||||
if (!agree) {
|
if (!agree) {
|
||||||
agree = true
|
agree = true
|
||||||
agreeNum += 1
|
agreeNum += 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue