mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-21 20:49:36 +01:00
resolve lint/detekt warnings
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
addb022083
commit
962972dce4
@ -30,6 +30,7 @@ import org.webrtc.MediaStream
|
||||
import org.webrtc.PeerConnection.IceConnectionState
|
||||
import org.webrtc.SurfaceViewRenderer
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
class ParticipantDisplayItem(
|
||||
private val context: Context,
|
||||
private val baseUrl: String,
|
||||
@ -79,6 +80,7 @@ class ParticipantDisplayItem(
|
||||
}
|
||||
|
||||
override fun onReaction(reaction: String) {
|
||||
// unused
|
||||
}
|
||||
}
|
||||
|
||||
@ -88,6 +90,7 @@ class ParticipantDisplayItem(
|
||||
updateFromModel()
|
||||
}
|
||||
|
||||
@Suppress("Detekt.TooGenericExceptionCaught")
|
||||
fun destroy() {
|
||||
callParticipantModel.removeObserver(callParticipantModelObserver)
|
||||
|
||||
|
@ -27,6 +27,7 @@ import com.nextcloud.talk.call.ParticipantUiState
|
||||
import org.webrtc.EglBase
|
||||
import kotlin.math.ceil
|
||||
|
||||
@Suppress("MagicNumber", "TooManyFunctions")
|
||||
@Composable
|
||||
fun ParticipantGrid(
|
||||
modifier: Modifier = Modifier,
|
||||
@ -101,6 +102,7 @@ fun ParticipantGrid(
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
@Preview
|
||||
@Composable
|
||||
fun ParticipantGridPreview() {
|
||||
@ -111,6 +113,7 @@ fun ParticipantGridPreview() {
|
||||
) {}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
@Preview
|
||||
@Composable
|
||||
fun TwoParticipants() {
|
||||
@ -121,6 +124,7 @@ fun TwoParticipants() {
|
||||
) {}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
@Preview
|
||||
@Composable
|
||||
fun ThreeParticipants() {
|
||||
@ -131,6 +135,7 @@ fun ThreeParticipants() {
|
||||
) {}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
@Preview
|
||||
@Composable
|
||||
fun FourParticipants() {
|
||||
@ -141,6 +146,7 @@ fun FourParticipants() {
|
||||
) {}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
@Preview
|
||||
@Composable
|
||||
fun FiveParticipants() {
|
||||
@ -151,6 +157,7 @@ fun FiveParticipants() {
|
||||
) {}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
@Preview
|
||||
@Composable
|
||||
fun SevenParticipants() {
|
||||
@ -161,6 +168,7 @@ fun SevenParticipants() {
|
||||
) {}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
@Preview
|
||||
@Composable
|
||||
fun FiftyParticipants() {
|
||||
@ -171,6 +179,7 @@ fun FiftyParticipants() {
|
||||
) {}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
@Preview(
|
||||
showBackground = false,
|
||||
heightDp = 360,
|
||||
@ -185,6 +194,7 @@ fun OneParticipantLandscape() {
|
||||
) {}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
@Preview(
|
||||
showBackground = false,
|
||||
heightDp = 360,
|
||||
@ -199,6 +209,7 @@ fun TwoParticipantsLandscape() {
|
||||
) {}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
@Preview(
|
||||
showBackground = false,
|
||||
heightDp = 360,
|
||||
@ -213,6 +224,7 @@ fun ThreeParticipantsLandscape() {
|
||||
) {}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
@Preview(
|
||||
showBackground = false,
|
||||
heightDp = 360,
|
||||
@ -227,6 +239,7 @@ fun FourParticipantsLandscape() {
|
||||
) {}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
@Preview(
|
||||
showBackground = false,
|
||||
heightDp = 360,
|
||||
@ -241,6 +254,7 @@ fun SevenParticipantsLandscape() {
|
||||
) {}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
@Preview(
|
||||
showBackground = false,
|
||||
heightDp = 360,
|
||||
|
@ -33,6 +33,9 @@ import com.nextcloud.talk.call.ParticipantUiState
|
||||
import com.nextcloud.talk.utils.ColorGenerator
|
||||
import org.webrtc.EglBase
|
||||
|
||||
const val NICK_OFFSET = 4f
|
||||
const val NICK_BLUR_RADIUS = 4f
|
||||
|
||||
@Composable
|
||||
fun ParticipantTile(
|
||||
participant: ParticipantUiState,
|
||||
@ -89,8 +92,8 @@ fun ParticipantTile(
|
||||
style = MaterialTheme.typography.bodyMedium.copy(
|
||||
shadow = Shadow(
|
||||
color = Color.Black,
|
||||
offset = Offset(4f, 4f),
|
||||
blurRadius = 4f
|
||||
offset = Offset(NICK_OFFSET, NICK_OFFSET),
|
||||
blurRadius = NICK_BLUR_RADIUS
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -15,6 +15,7 @@ import kotlin.math.abs
|
||||
// See https://github.com/nextcloud/nextcloud-vue/blob/56b79afae93f4701a0cb933bfeb7b4a2fbd590fb/src/functions/usernameToColor/usernameToColor.js
|
||||
// and https://github.com/nextcloud/nextcloud-vue/blob/56b79afae93f4701a0cb933bfeb7b4a2fbd590fb/src/utils/GenColors.js
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
class ColorGenerator private constructor() {
|
||||
|
||||
private val steps = 6
|
||||
|
Loading…
Reference in New Issue
Block a user