Collapse long lists of message reactions (#806)
--------- Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
+7
@@ -28,6 +28,13 @@ import androidx.compose.ui.unit.TextUnit
|
||||
@Composable
|
||||
fun Dp.toSp(): TextUnit = with(LocalDensity.current) { toSp() }
|
||||
|
||||
/**
|
||||
* Convert Sp to Dp, regarding current density.
|
||||
* Can be used for instance to use Sp unit for size.
|
||||
*/
|
||||
@Composable
|
||||
fun TextUnit.toDp(): Dp = with(LocalDensity.current) { toDp() }
|
||||
|
||||
/**
|
||||
* Convert Px value to Dp, regarding current density.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user