Merge branch 'master' into maintenance

This commit is contained in:
Tlaster 2020-04-21 15:17:06 +08:00
commit ecf1776eb1
2 changed files with 11 additions and 0 deletions

View File

@ -1000,6 +1000,7 @@ class ComposeActivity : BaseActivity(), OnMenuItemClickListener, OnClickListener
} }
AccountType.MASTODON -> { AccountType.MASTODON -> {
addMastodonMentions(status.text_unescaped, status.spans, mentions) addMastodonMentions(status.text_unescaped, status.spans, mentions)
mentions.remove("${accountUser.screen_name}@${accountUser.key.host}")
} }
else -> if (status.mentions.isNotNullOrEmpty()) { else -> if (status.mentions.isNotNullOrEmpty()) {
status.mentions.filterNot { status.mentions.filterNot {

View File

@ -71,6 +71,16 @@ fun AccountDetails.getMediaSizeLimit(@MediaCategory mediaCategory: String? = nul
} }
return UpdateStatusTask.SizeLimit(imageLimit, videoLimit) return UpdateStatusTask.SizeLimit(imageLimit, videoLimit)
} }
AccountType.MASTODON -> {
val imageLimit = AccountExtras.ImageLimit().apply {
maxSizeSync = 8 * 1024 * 1024
maxSizeAsync = 8 * 1024 * 1024
maxHeight = 1280
maxWidth = 1280
}
val videoLimit = AccountExtras.VideoLimit.twitterDefault()
return UpdateStatusTask.SizeLimit(imageLimit, videoLimit)
}
else -> return null else -> return null
} }
} }