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.PeerConnection.IceConnectionState
|
||||||
import org.webrtc.SurfaceViewRenderer
|
import org.webrtc.SurfaceViewRenderer
|
||||||
|
|
||||||
|
@Suppress("LongParameterList")
|
||||||
class ParticipantDisplayItem(
|
class ParticipantDisplayItem(
|
||||||
private val context: Context,
|
private val context: Context,
|
||||||
private val baseUrl: String,
|
private val baseUrl: String,
|
||||||
@ -79,6 +80,7 @@ class ParticipantDisplayItem(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onReaction(reaction: String) {
|
override fun onReaction(reaction: String) {
|
||||||
|
// unused
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,6 +90,7 @@ class ParticipantDisplayItem(
|
|||||||
updateFromModel()
|
updateFromModel()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("Detekt.TooGenericExceptionCaught")
|
||||||
fun destroy() {
|
fun destroy() {
|
||||||
callParticipantModel.removeObserver(callParticipantModelObserver)
|
callParticipantModel.removeObserver(callParticipantModelObserver)
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ import com.nextcloud.talk.call.ParticipantUiState
|
|||||||
import org.webrtc.EglBase
|
import org.webrtc.EglBase
|
||||||
import kotlin.math.ceil
|
import kotlin.math.ceil
|
||||||
|
|
||||||
|
@Suppress("MagicNumber", "TooManyFunctions")
|
||||||
@Composable
|
@Composable
|
||||||
fun ParticipantGrid(
|
fun ParticipantGrid(
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
@ -101,6 +102,7 @@ fun ParticipantGrid(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("MagicNumber")
|
||||||
@Preview
|
@Preview
|
||||||
@Composable
|
@Composable
|
||||||
fun ParticipantGridPreview() {
|
fun ParticipantGridPreview() {
|
||||||
@ -111,6 +113,7 @@ fun ParticipantGridPreview() {
|
|||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("MagicNumber")
|
||||||
@Preview
|
@Preview
|
||||||
@Composable
|
@Composable
|
||||||
fun TwoParticipants() {
|
fun TwoParticipants() {
|
||||||
@ -121,6 +124,7 @@ fun TwoParticipants() {
|
|||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("MagicNumber")
|
||||||
@Preview
|
@Preview
|
||||||
@Composable
|
@Composable
|
||||||
fun ThreeParticipants() {
|
fun ThreeParticipants() {
|
||||||
@ -131,6 +135,7 @@ fun ThreeParticipants() {
|
|||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("MagicNumber")
|
||||||
@Preview
|
@Preview
|
||||||
@Composable
|
@Composable
|
||||||
fun FourParticipants() {
|
fun FourParticipants() {
|
||||||
@ -141,6 +146,7 @@ fun FourParticipants() {
|
|||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("MagicNumber")
|
||||||
@Preview
|
@Preview
|
||||||
@Composable
|
@Composable
|
||||||
fun FiveParticipants() {
|
fun FiveParticipants() {
|
||||||
@ -151,6 +157,7 @@ fun FiveParticipants() {
|
|||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("MagicNumber")
|
||||||
@Preview
|
@Preview
|
||||||
@Composable
|
@Composable
|
||||||
fun SevenParticipants() {
|
fun SevenParticipants() {
|
||||||
@ -161,6 +168,7 @@ fun SevenParticipants() {
|
|||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("MagicNumber")
|
||||||
@Preview
|
@Preview
|
||||||
@Composable
|
@Composable
|
||||||
fun FiftyParticipants() {
|
fun FiftyParticipants() {
|
||||||
@ -171,6 +179,7 @@ fun FiftyParticipants() {
|
|||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("MagicNumber")
|
||||||
@Preview(
|
@Preview(
|
||||||
showBackground = false,
|
showBackground = false,
|
||||||
heightDp = 360,
|
heightDp = 360,
|
||||||
@ -185,6 +194,7 @@ fun OneParticipantLandscape() {
|
|||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("MagicNumber")
|
||||||
@Preview(
|
@Preview(
|
||||||
showBackground = false,
|
showBackground = false,
|
||||||
heightDp = 360,
|
heightDp = 360,
|
||||||
@ -199,6 +209,7 @@ fun TwoParticipantsLandscape() {
|
|||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("MagicNumber")
|
||||||
@Preview(
|
@Preview(
|
||||||
showBackground = false,
|
showBackground = false,
|
||||||
heightDp = 360,
|
heightDp = 360,
|
||||||
@ -213,6 +224,7 @@ fun ThreeParticipantsLandscape() {
|
|||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("MagicNumber")
|
||||||
@Preview(
|
@Preview(
|
||||||
showBackground = false,
|
showBackground = false,
|
||||||
heightDp = 360,
|
heightDp = 360,
|
||||||
@ -227,6 +239,7 @@ fun FourParticipantsLandscape() {
|
|||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("MagicNumber")
|
||||||
@Preview(
|
@Preview(
|
||||||
showBackground = false,
|
showBackground = false,
|
||||||
heightDp = 360,
|
heightDp = 360,
|
||||||
@ -241,6 +254,7 @@ fun SevenParticipantsLandscape() {
|
|||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("MagicNumber")
|
||||||
@Preview(
|
@Preview(
|
||||||
showBackground = false,
|
showBackground = false,
|
||||||
heightDp = 360,
|
heightDp = 360,
|
||||||
|
@ -33,6 +33,9 @@ import com.nextcloud.talk.call.ParticipantUiState
|
|||||||
import com.nextcloud.talk.utils.ColorGenerator
|
import com.nextcloud.talk.utils.ColorGenerator
|
||||||
import org.webrtc.EglBase
|
import org.webrtc.EglBase
|
||||||
|
|
||||||
|
const val NICK_OFFSET = 4f
|
||||||
|
const val NICK_BLUR_RADIUS = 4f
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun ParticipantTile(
|
fun ParticipantTile(
|
||||||
participant: ParticipantUiState,
|
participant: ParticipantUiState,
|
||||||
@ -89,8 +92,8 @@ fun ParticipantTile(
|
|||||||
style = MaterialTheme.typography.bodyMedium.copy(
|
style = MaterialTheme.typography.bodyMedium.copy(
|
||||||
shadow = Shadow(
|
shadow = Shadow(
|
||||||
color = Color.Black,
|
color = Color.Black,
|
||||||
offset = Offset(4f, 4f),
|
offset = Offset(NICK_OFFSET, NICK_OFFSET),
|
||||||
blurRadius = 4f
|
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
|
// 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
|
// and https://github.com/nextcloud/nextcloud-vue/blob/56b79afae93f4701a0cb933bfeb7b4a2fbd590fb/src/utils/GenColors.js
|
||||||
|
|
||||||
|
@Suppress("MagicNumber")
|
||||||
class ColorGenerator private constructor() {
|
class ColorGenerator private constructor() {
|
||||||
|
|
||||||
private val steps = 6
|
private val steps = 6
|
||||||
|
Loading…
Reference in New Issue
Block a user