Moves the Following Vector to a native composable.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
package com.vitorpamplona.amethyst.ui.note
|
||||
|
||||
import Following
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
@@ -63,6 +64,7 @@ import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.vitorpamplona.amethyst.R
|
||||
import com.vitorpamplona.amethyst.commons.hashtags.Amethyst
|
||||
import com.vitorpamplona.amethyst.commons.hashtags.Cashu
|
||||
import com.vitorpamplona.amethyst.commons.hashtags.CustomHashTagIcons
|
||||
import com.vitorpamplona.amethyst.ui.theme.BitcoinOrange
|
||||
@@ -72,11 +74,12 @@ import com.vitorpamplona.amethyst.ui.theme.Size30Modifier
|
||||
import com.vitorpamplona.amethyst.ui.theme.grayText
|
||||
import com.vitorpamplona.amethyst.ui.theme.placeholderText
|
||||
import com.vitorpamplona.amethyst.ui.theme.subtleButton
|
||||
import kotlin.time.measureTimedValue
|
||||
|
||||
@Composable
|
||||
fun AmethystIcon(iconSize: Dp) {
|
||||
Icon(
|
||||
painter = painterResource(R.drawable.amethyst),
|
||||
imageVector = CustomHashTagIcons.Amethyst,
|
||||
contentDescription = stringResource(id = R.string.app_logo),
|
||||
modifier = Modifier.size(iconSize),
|
||||
tint = Color.Unspecified,
|
||||
@@ -85,12 +88,16 @@ fun AmethystIcon(iconSize: Dp) {
|
||||
|
||||
@Composable
|
||||
fun FollowingIcon(iconSize: Dp) {
|
||||
Icon(
|
||||
painter = painterResource(R.drawable.following),
|
||||
contentDescription = stringResource(id = R.string.following),
|
||||
modifier = Modifier.size(iconSize),
|
||||
tint = Color.Unspecified,
|
||||
)
|
||||
val (value, elapsed) =
|
||||
measureTimedValue {
|
||||
Icon(
|
||||
imageVector = Following,
|
||||
contentDescription = stringResource(id = R.string.following),
|
||||
modifier = Modifier.size(iconSize),
|
||||
tint = Color.Unspecified,
|
||||
)
|
||||
}
|
||||
println("FollowingIcon $elapsed")
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
||||
@@ -89,6 +89,8 @@ import androidx.compose.ui.unit.dp
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import com.vitorpamplona.amethyst.Amethyst
|
||||
import com.vitorpamplona.amethyst.R
|
||||
import com.vitorpamplona.amethyst.commons.hashtags.Amethyst
|
||||
import com.vitorpamplona.amethyst.commons.hashtags.CustomHashTagIcons
|
||||
import com.vitorpamplona.amethyst.service.PackageUtils
|
||||
import com.vitorpamplona.amethyst.ui.MainActivity
|
||||
import com.vitorpamplona.amethyst.ui.actions.LoadingAnimation
|
||||
@@ -245,7 +247,7 @@ fun LoginPage(
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
) {
|
||||
Image(
|
||||
painterResource(id = R.drawable.amethyst),
|
||||
imageVector = CustomHashTagIcons.Amethyst,
|
||||
contentDescription = stringResource(R.string.app_logo),
|
||||
modifier = Modifier.size(150.dp),
|
||||
contentScale = ContentScale.Inside,
|
||||
|
||||
@@ -54,7 +54,6 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.LocalUriHandler
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.SpanStyle
|
||||
import androidx.compose.ui.text.buildAnnotatedString
|
||||
@@ -66,6 +65,8 @@ import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import com.vitorpamplona.amethyst.R
|
||||
import com.vitorpamplona.amethyst.commons.hashtags.Amethyst
|
||||
import com.vitorpamplona.amethyst.commons.hashtags.CustomHashTagIcons
|
||||
import com.vitorpamplona.amethyst.service.PackageUtils
|
||||
import com.vitorpamplona.amethyst.ui.screen.AccountStateViewModel
|
||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.ConnectOrbotDialog
|
||||
@@ -116,7 +117,7 @@ fun SignUpPage(
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
) {
|
||||
Image(
|
||||
painterResource(id = R.drawable.amethyst),
|
||||
imageVector = CustomHashTagIcons.Amethyst,
|
||||
contentDescription = stringResource(R.string.app_logo),
|
||||
modifier = Modifier.size(150.dp),
|
||||
contentScale = ContentScale.Inside,
|
||||
|
||||
Reference in New Issue
Block a user