enabled retweet protected user for fanfou
disabled retweet button when no comment text
This commit is contained in:
parent
5434e21cdb
commit
40309753bd
|
@ -2,6 +2,7 @@ package org.mariotaku.twidere.extension.model
|
|||
|
||||
import org.mariotaku.ktextension.addAllTo
|
||||
import org.mariotaku.microblog.library.mastodon.annotation.StatusVisibility
|
||||
import org.mariotaku.twidere.TwidereConstants.USER_TYPE_FANFOU_COM
|
||||
import org.mariotaku.twidere.model.*
|
||||
import org.mariotaku.twidere.util.UriUtils
|
||||
import org.mariotaku.twidere.util.Utils
|
||||
|
@ -69,6 +70,7 @@ inline val ParcelableStatus.is_my_retweet: Boolean
|
|||
|
||||
inline val ParcelableStatus.can_retweet: Boolean
|
||||
get() {
|
||||
if (user_key.host == USER_TYPE_FANFOU_COM) return true
|
||||
if (user_is_protected) return false
|
||||
return when (extras?.visibility) {
|
||||
StatusVisibility.PRIVATE -> false
|
||||
|
|
|
@ -171,10 +171,11 @@ class RetweetQuoteDialogFragment : AbsStatusDialogFragment() {
|
|||
} else if (canQuoteRetweet(account)) {
|
||||
if (editComment.empty) {
|
||||
positiveButton.setText(R.string.action_retweet)
|
||||
positiveButton.isEnabled = status.can_retweet
|
||||
} else {
|
||||
positiveButton.setText(R.string.action_comment)
|
||||
}
|
||||
positiveButton.isEnabled = true
|
||||
}
|
||||
} else {
|
||||
positiveButton.setText(R.string.action_retweet)
|
||||
positiveButton.isEnabled = status.can_retweet
|
||||
|
|
Loading…
Reference in New Issue