upgrade ktlint plugin to 12.0.3 (#4169)
There are some new rules, I think they mostly make sense, except for the max line length which I had to disable because we are over it in a lot of places. --------- Co-authored-by: Goooler <wangzongler@gmail.com>
This commit is contained in:
parent
33cd6fdb98
commit
5192fb08a5
215 changed files with 2813 additions and 1177 deletions
|
|
@ -6,9 +6,9 @@ import com.keylesspalace.tusky.appstore.PreferenceChangedEvent
|
|||
import com.keylesspalace.tusky.db.AccountEntity
|
||||
import com.keylesspalace.tusky.db.AccountManager
|
||||
import com.keylesspalace.tusky.di.ApplicationScope
|
||||
import javax.inject.Inject
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.launch
|
||||
import javax.inject.Inject
|
||||
|
||||
class AccountPreferenceDataStore @Inject constructor(
|
||||
private val accountManager: AccountManager,
|
||||
|
|
|
|||
|
|
@ -31,6 +31,13 @@ class ProxyConfiguration private constructor(
|
|||
}
|
||||
}
|
||||
|
||||
private val PROXY_RANGE = IntRange(ProxyConfiguration.MIN_PROXY_PORT, ProxyConfiguration.MAX_PROXY_PORT)
|
||||
private val IP_ADDRESS_REGEX = Regex("^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$")
|
||||
private val HOSTNAME_REGEX = Regex("^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])$")
|
||||
private val PROXY_RANGE =
|
||||
IntRange(ProxyConfiguration.MIN_PROXY_PORT, ProxyConfiguration.MAX_PROXY_PORT)
|
||||
private val IP_ADDRESS_REGEX =
|
||||
Regex(
|
||||
"^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$"
|
||||
)
|
||||
private val HOSTNAME_REGEX =
|
||||
Regex(
|
||||
"^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])$"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,10 @@ inline fun PreferenceParent.listPreference(builder: ListPreference.() -> Unit):
|
|||
return pref
|
||||
}
|
||||
|
||||
inline fun <A> PreferenceParent.emojiPreference(activity: A, builder: EmojiPickerPreference.() -> Unit): EmojiPickerPreference
|
||||
inline fun <A> PreferenceParent.emojiPreference(
|
||||
activity: A,
|
||||
builder: EmojiPickerPreference.() -> Unit
|
||||
): EmojiPickerPreference
|
||||
where A : Context, A : ActivityResultRegistryOwner, A : LifecycleOwner {
|
||||
val pref = EmojiPickerPreference.get(activity)
|
||||
builder(pref)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue