feat: see status text in user sheet
Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
parent
828f7bc420
commit
28bdc532a2
|
|
@ -6,6 +6,7 @@ import android.os.Build
|
|||
import androidx.compose.ui.geometry.Offset
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ShaderBrush
|
||||
import androidx.compose.ui.graphics.SolidColor
|
||||
import org.intellij.lang.annotations.Language
|
||||
import androidx.compose.ui.graphics.Brush as AndroidBrush
|
||||
|
||||
|
|
@ -48,6 +49,17 @@ object SpecialUsers {
|
|||
end = Offset.Infinite
|
||||
)
|
||||
), // jen
|
||||
"01FN54E7AD80NVTXF3VPF789NV" to TeamMemberFlair.Brush(
|
||||
SolidColor(Color(0xfff34848))
|
||||
), // jack
|
||||
"01FDVES092RQR3YTY4JBGA0VCA" to TeamMemberFlair.Brush(
|
||||
AndroidBrush.verticalGradient(
|
||||
listOf(
|
||||
Color(0xFFBB4681),
|
||||
Color(0xFF9CA87F)
|
||||
)
|
||||
)
|
||||
), // tom
|
||||
"01EX2NCWQ0CHS3QJF0FEQS1GR4" to TeamMemberFlair.AGSLShader(
|
||||
INSERT_SHADER,
|
||||
AndroidBrush.linearGradient(
|
||||
|
|
@ -59,17 +71,6 @@ object SpecialUsers {
|
|||
end = Offset.Infinite
|
||||
)
|
||||
), // insert
|
||||
"01EXAF3KX65608AJ4NG27YG1HM" to TeamMemberFlair.Brush(
|
||||
AndroidBrush.solidColor(Color(0xFFFFC1F1))
|
||||
), // lea
|
||||
"01FEEFJCKY5C4DMMJYZ20ACWWC" to TeamMemberFlair.Brush(
|
||||
AndroidBrush.linearGradient(
|
||||
listOf(
|
||||
Color(0xFF0BA39F),
|
||||
Color(0xFFCD1414)
|
||||
)
|
||||
)
|
||||
), // sophie
|
||||
"01FD58YK5W7QRV5H3D64KTQYX3" to TeamMemberFlair.Brush(
|
||||
AndroidBrush.verticalGradient(
|
||||
listOf(
|
||||
|
|
@ -78,14 +79,6 @@ object SpecialUsers {
|
|||
)
|
||||
)
|
||||
), // zomatree
|
||||
"01FDVES092RQR3YTY4JBGA0VCA" to TeamMemberFlair.Brush(
|
||||
AndroidBrush.verticalGradient(
|
||||
listOf(
|
||||
Color(0xFFBB4681),
|
||||
Color(0xFF9CA87F)
|
||||
)
|
||||
)
|
||||
) // tom
|
||||
)
|
||||
|
||||
fun teamFlairAsBrush(context: Context, id: String): AndroidBrush? {
|
||||
|
|
|
|||
|
|
@ -246,6 +246,29 @@ fun UserInfoSheet(
|
|||
}
|
||||
}
|
||||
|
||||
if (user.status?.text != null) {
|
||||
item(key = "status") {
|
||||
SheetTile(
|
||||
header = {
|
||||
Text(stringResource(R.string.user_info_sheet_category_status))
|
||||
},
|
||||
contentPreview = {
|
||||
Text(
|
||||
text = user.status.text,
|
||||
fontSize = 14.sp,
|
||||
maxLines = 5,
|
||||
overflow = TextOverflow.Ellipsis
|
||||
)
|
||||
}
|
||||
) {
|
||||
Text(
|
||||
text = user.status.text,
|
||||
style = MaterialTheme.typography.bodyMedium
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (user.bot != null) {
|
||||
val resolvedOwner = user.bot.owner?.let { RevoltAPI.userCache[it] }
|
||||
|
||||
|
|
|
|||
|
|
@ -375,6 +375,7 @@
|
|||
<string name="user_info_sheet_failed_to_open_dm">Could not open DM with this user.</string>
|
||||
<string name="user_info_sheet_user_is_bot">This is a bot.</string>
|
||||
<string name="user_info_sheet_user_is_bot_easter_egg">This is a bot. It has a plan.</string>
|
||||
<string name="user_info_sheet_category_status">Status</string>
|
||||
|
||||
<string name="member_context_sheet_open">Open member options</string>
|
||||
<string name="member_context_sheet_remove_from_channel">Remove from %1$s</string>
|
||||
|
|
|
|||
Loading…
Reference in New Issue