Upgrade ktlint and add twitter compose rules.

This commit is contained in:
Alex Hart
2023-02-06 11:04:40 -04:00
committed by Greyson Parrelli
parent 52e9b31554
commit 605289aca4
174 changed files with 574 additions and 373 deletions

View File

@@ -7,7 +7,8 @@ import androidx.annotation.StringRes
* Allows setting of megaphone text by string resource or string literal.
*/
data class MegaphoneText(@StringRes private val stringRes: Int = 0, private val string: String? = null) {
@get:JvmName("hasText") val hasText = stringRes != 0 || string != null
@get:JvmName("hasText")
val hasText = stringRes != 0 || string != null
fun resolve(context: Context): String? {
return if (stringRes != 0) context.getString(stringRes) else string