アプリ設定を変更するまでMisskeyサーバへの通知チェックを行わない

This commit is contained in:
tateisu 2022-07-07 23:47:00 +09:00
parent 4b4fe9fe90
commit fbe7c7d02a
5 changed files with 22 additions and 10 deletions

View File

@ -239,6 +239,8 @@ val appSettingRoot = AppSettingItem(null, SettingType.Section, R.string.app_sett
}
sw(PrefB.bpDivideNotification, R.string.divide_notification)
sw(PrefB.bpMisskeyNotificationCheck, R.string.enable_misskey_notification_check)
}
section(R.string.behavior) {

View File

@ -294,16 +294,20 @@ class PollingChecker(
cache = NotificationCache(account.db_id).apply {
load()
requestAsync(
client,
account,
wps.flags,
) { result ->
account.updateNotificationError("${result.error} ${result.requestInfo}".trim())
if (result.error?.contains("Timeout") == true &&
!account.dont_show_timeout
) {
progress(account, PollingState.Timeout)
if( account.isMisskey && ! PrefB.bpMisskeyNotificationCheck() ){
log.d("skip misskey server. ${account.acct}")
}else{
requestAsync(
client,
account,
wps.flags,
) { result ->
account.updateNotificationError("${result.error} ${result.requestInfo}".trim())
if (result.error?.contains("Timeout") == true &&
!account.dont_show_timeout
) {
progress(account, PollingState.Timeout)
}
}
}
}

View File

@ -347,4 +347,8 @@ object PrefB {
"MfmDecorationShowUnsupportedMarkup",
true
)
val bpMisskeyNotificationCheck = BooleanPref(
"MisskeyNotificationCheck",
false
)
}

View File

@ -1149,4 +1149,5 @@
<string name="post_error_attachments_duplicated">Misskeyは添付データの重複を許可していません。</string>
<string name="use_web_settings">Web設定を使う</string>
<string name="content">本文</string>
<string name="enable_misskey_notification_check">Misskeyサーバで通知チェックを行う(不安定)</string>
</resources>

View File

@ -1158,4 +1158,5 @@
<string name="post_error_attachments_duplicated">Misskey does not allow duplicate in attachments.</string>
<string name="use_web_settings">(Use web setting)</string>
<string name="content">Content</string>
<string name="enable_misskey_notification_check">Enable notification check for Misskey server (unstable)</string>
</resources>