fixed #912
This commit is contained in:
parent
6da2717a3b
commit
8efe2b9472
|
@ -119,7 +119,7 @@ class RetweetQuoteDialogFragment : AbsStatusDialogFragment() {
|
|||
}
|
||||
|
||||
getButton(DialogInterface.BUTTON_POSITIVE).setOnClickListener {
|
||||
if (status.is_my_retweet) {
|
||||
if (!shouldQuoteRetweet(account) && status.is_my_retweet) {
|
||||
twitterWrapper.cancelRetweetAsync(account.key, status.id, status.my_retweet_id)
|
||||
dismiss()
|
||||
} else if (retweetOrQuote(account, status, showProtectedConfirm)) {
|
||||
|
@ -187,6 +187,12 @@ class RetweetQuoteDialogFragment : AbsStatusDialogFragment() {
|
|||
textCountView.textCount = validator.getTweetLength(s.toString())
|
||||
}
|
||||
|
||||
private fun DialogInterface.shouldQuoteRetweet(account: AccountDetails): Boolean {
|
||||
if (this !is AlertDialog) return false
|
||||
if (!canQuoteRetweet(account)) return false
|
||||
return !editComment.empty
|
||||
}
|
||||
|
||||
@CheckResult
|
||||
private fun retweetOrQuote(account: AccountDetails, status: ParcelableStatus,
|
||||
showProtectedConfirmation: Boolean): Boolean {
|
||||
|
|
Loading…
Reference in New Issue