(Misskey)投稿画面の最大文字数を3000にする
This commit is contained in:
parent
0ae936ed70
commit
788933cb11
|
@ -977,17 +977,22 @@ class ActPost : AppCompatActivity(), View.OnClickListener, PostAttachment.Callba
|
|||
private var lastInstanceTask : TootTaskRunner? = null
|
||||
|
||||
private fun getMaxCharCount() : Int {
|
||||
|
||||
val account = account
|
||||
if(account != null
|
||||
&& ! account.isPseudo
|
||||
&& ! account.isMisskey
|
||||
) {
|
||||
|
||||
when{
|
||||
account == null || account.isPseudo -> {}
|
||||
|
||||
account.isMisskey ->return 3000
|
||||
|
||||
else->{
|
||||
val info = account.instance
|
||||
var lastTask = lastInstanceTask
|
||||
|
||||
// 情報がないか古いなら再取得
|
||||
if(info == null || System.currentTimeMillis() - info.time_parse >= 300000L) {
|
||||
|
||||
// 同時に実行するタスクは1つまで
|
||||
var lastTask = lastInstanceTask
|
||||
if(lastTask?.isActive != true) {
|
||||
lastTask = TootTaskRunner(this, TootTaskRunner.PROGRESS_NONE)
|
||||
lastInstanceTask = lastTask
|
||||
|
@ -1008,11 +1013,11 @@ class ActPost : AppCompatActivity(), View.OnClickListener, PostAttachment.Callba
|
|||
}
|
||||
}
|
||||
})
|
||||
// fall thru
|
||||
}
|
||||
}
|
||||
|
||||
if(info != null) {
|
||||
val max = info.max_toot_chars
|
||||
val max = info?.max_toot_chars
|
||||
if(max != null && max > 0) return max
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue