mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Upgrade ktlint and add twitter compose rules.
This commit is contained in:
committed by
Greyson Parrelli
parent
52e9b31554
commit
605289aca4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user