feat: spaghetti server banner impl
Signed-off-by: Infi <wingit@geist.ga>
This commit is contained in:
parent
df0393ffc9
commit
bf427a79d9
|
|
@ -28,10 +28,12 @@ import androidx.compose.ui.text.style.TextAlign
|
|||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import chat.revolt.R
|
||||
import chat.revolt.api.REVOLT_FILES
|
||||
import chat.revolt.api.RevoltAPI
|
||||
import chat.revolt.api.internals.ChannelUtils
|
||||
import chat.revolt.api.schemas.ChannelType
|
||||
import chat.revolt.api.schemas.User
|
||||
import chat.revolt.components.generic.RemoteImage
|
||||
import chat.revolt.components.generic.presenceFromStatus
|
||||
import chat.revolt.components.screens.chat.drawer.server.DrawerChannel
|
||||
import chat.revolt.sheets.ChannelContextSheet
|
||||
|
|
@ -197,6 +199,20 @@ fun RowScope.ChannelList(
|
|||
)
|
||||
}
|
||||
|
||||
server?.banner?.let {
|
||||
item {
|
||||
RemoteImage(
|
||||
url = "$REVOLT_FILES/banners/${it.id}",
|
||||
description = null,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(200.dp)
|
||||
.padding(start = 16.dp, end = 16.dp, top = 0.dp, bottom = 16.dp)
|
||||
.clip(RoundedCornerShape(16.dp))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (server?.channels?.isEmpty() == true) {
|
||||
item {
|
||||
Column(
|
||||
|
|
|
|||
Loading…
Reference in New Issue