mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2025-02-16 19:50:53 +01:00
fixed fanfou retweet
This commit is contained in:
parent
61e8a6d3b1
commit
c1a987ce15
@ -189,7 +189,7 @@ class RetweetQuoteDialogFragment : AbsStatusDialogFragment() {
|
||||
val twitter = twitterWrapper
|
||||
val dialog = dialog ?: return false
|
||||
val editComment = dialog.editComment
|
||||
if (canQuoteRetweet(account) && !editComment.empty) {
|
||||
if (dialog.isQuoteRetweet(account)) {
|
||||
val quoteOriginalStatus = dialog.quoteOriginal.isChecked
|
||||
|
||||
var commentText: String
|
||||
@ -250,6 +250,14 @@ class RetweetQuoteDialogFragment : AbsStatusDialogFragment() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun Dialog.isQuoteRetweet(account: AccountDetails): Boolean {
|
||||
return when (account.type) {
|
||||
AccountType.FANFOU -> true
|
||||
AccountType.TWITTER -> !editComment.empty
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
private fun Dialog.saveToDrafts() {
|
||||
val text = dialog.editComment.text.toString()
|
||||
val draft = Draft()
|
||||
|
@ -56,6 +56,7 @@ object StatusCodeMessageUtils {
|
||||
TWITTER_ERROR_CODE_MESSAGES.put(193, R.string.error_twitter_193)
|
||||
TWITTER_ERROR_CODE_MESSAGES.put(215, R.string.error_twitter_215)
|
||||
TWITTER_ERROR_CODE_MESSAGES.put(326, R.string.error_twitter_326)
|
||||
TWITTER_ERROR_CODE_MESSAGES.put(327, R.string.error_twitter_327)
|
||||
|
||||
TWITTER_ERROR_CODE_ICONS.put(136, R.drawable.ic_info_error_blocked)
|
||||
|
||||
|
@ -35,5 +35,6 @@
|
||||
<!-- 215 Bad authentication data: Typically sent with 1.1 responses with HTTP code 400. The method requires authentication but it was not presented or was wholly invalid -->
|
||||
<string name="error_twitter_215">You may need to sign in again.</string>
|
||||
<string name="error_twitter_326">Your account was suspended, please visit https://twitter.com/ for details.</string>
|
||||
<string name="error_twitter_327">You\'ve already retweeted this tweet.</string>
|
||||
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user