refactor: rename user context sheet to user info sheet

Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
Infi 2023-11-11 03:49:24 +01:00
parent 551be72a94
commit adba9da754
3 changed files with 12 additions and 10 deletions

View File

@ -104,7 +104,7 @@ import chat.revolt.sheets.EmoteInfoSheet
import chat.revolt.sheets.LinkInfoSheet
import chat.revolt.sheets.ServerContextSheet
import chat.revolt.sheets.StatusSheet
import chat.revolt.sheets.UserContextSheet
import chat.revolt.sheets.UserInfoSheet
import com.airbnb.lottie.RenderMode
import com.airbnb.lottie.compose.LottieAnimation
import com.airbnb.lottie.compose.LottieCompositionSpec
@ -584,7 +584,7 @@ fun ChatRouterScreen(
showUserContextSheet = false
}
) {
UserContextSheet(
UserInfoSheet(
userId = userContextSheetTarget,
serverId = userContextSheetServer
)

View File

@ -61,9 +61,9 @@ import chat.revolt.components.generic.UserAvatar
import chat.revolt.components.generic.presenceFromStatus
import dagger.hilt.android.lifecycle.HiltViewModel
import dagger.hilt.android.qualifiers.ApplicationContext
import javax.inject.Inject
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.launch
import javax.inject.Inject
val DO_NOT_FETCH_OFFLINE_MEMBERS_SERVERS = listOf(
"01F7ZSBSFHQ8TA81725KQCSDDP" // Revolt Lounge
@ -245,7 +245,7 @@ fun MemberListSheet(
showUserContextSheet = false
}
) {
UserContextSheet(
UserInfoSheet(
userId = userContextSheetTarget,
serverId = serverId
)
@ -312,11 +312,13 @@ fun MemberListMemberUser(
onSelectUser: (String) -> Unit
) {
val highestColourRole = serverId?.let {
Roles.resolveHighestRole(
it,
user.id!!,
true
)
user.id?.let { userId ->
Roles.resolveHighestRole(
it,
userId,
true
)
}
}
val colour = highestColourRole?.colour?.let { WebCompat.parseColour(it) }
?: Brush.solidColor(LocalContentColor.current)

View File

@ -40,7 +40,7 @@ import chat.revolt.components.screens.settings.RawUserOverview
@OptIn(ExperimentalLayoutApi::class)
@Composable
fun UserContextSheet(userId: String, serverId: String? = null) {
fun UserInfoSheet(userId: String, serverId: String? = null) {
val user = RevoltAPI.userCache[userId]
val member = serverId?.let { RevoltAPI.members.getMember(it, userId) }