Removing some unnecessary code
This commit is contained in:
@@ -40,7 +40,6 @@ import androidx.compose.material.Text
|
|||||||
import androidx.compose.material.darkColors
|
import androidx.compose.material.darkColors
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.Bolt
|
import androidx.compose.material.icons.filled.Bolt
|
||||||
import androidx.compose.material.icons.filled.ContentCopy
|
|
||||||
import androidx.compose.material.icons.filled.ExpandMore
|
import androidx.compose.material.icons.filled.ExpandMore
|
||||||
import androidx.compose.material.icons.filled.Link
|
import androidx.compose.material.icons.filled.Link
|
||||||
import androidx.compose.material.icons.filled.MoreVert
|
import androidx.compose.material.icons.filled.MoreVert
|
||||||
@@ -799,30 +798,6 @@ fun RenderAppDefinition(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
|
||||||
Text(
|
|
||||||
text = note.idDisplayNote(),
|
|
||||||
modifier = Modifier.padding(top = 1.dp, bottom = 1.dp),
|
|
||||||
color = MaterialTheme.colors.onSurface.copy(alpha = 0.32f)
|
|
||||||
)
|
|
||||||
|
|
||||||
IconButton(
|
|
||||||
modifier = Modifier
|
|
||||||
.size(25.dp)
|
|
||||||
.padding(start = 5.dp),
|
|
||||||
onClick = { clipboardManager.setText(AnnotatedString(note.idDisplayNote())); }
|
|
||||||
) {
|
|
||||||
Icon(
|
|
||||||
imageVector = Icons.Default.ContentCopy,
|
|
||||||
null,
|
|
||||||
modifier = Modifier.size(15.dp),
|
|
||||||
tint = MaterialTheme.colors.onSurface.copy(alpha = 0.32f)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DisplayNip05ProfileStatus(user)
|
|
||||||
|
|
||||||
val website = it.website
|
val website = it.website
|
||||||
if (!website.isNullOrEmpty()) {
|
if (!website.isNullOrEmpty()) {
|
||||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||||
|
|||||||
@@ -270,12 +270,6 @@ class UserReactionsViewModel(val account: Account) : ViewModel() {
|
|||||||
var collectorJob: Job? = null
|
var collectorJob: Job? = null
|
||||||
|
|
||||||
init {
|
init {
|
||||||
_reactions.value = emptyMap()
|
|
||||||
_boosts.value = emptyMap()
|
|
||||||
_zaps.value = emptyMap()
|
|
||||||
_replies.value = emptyMap()
|
|
||||||
takenIntoAccount = emptySet()
|
|
||||||
|
|
||||||
viewModelScope.launch(Dispatchers.IO) {
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
initializeSuspend()
|
initializeSuspend()
|
||||||
|
|
||||||
|
|||||||
+45
-45
@@ -123,52 +123,52 @@ fun SummaryBar(model: UserReactionsViewModel) {
|
|||||||
showChart = !showChart
|
showChart = !showChart
|
||||||
}
|
}
|
||||||
|
|
||||||
val lineChartCount =
|
|
||||||
lineChart(
|
|
||||||
lines = listOf(RoyalBlue, Color.Green, Color.Red).map { lineChartColor ->
|
|
||||||
LineChart.LineSpec(
|
|
||||||
lineColor = lineChartColor.toArgb(),
|
|
||||||
lineBackgroundShader = DynamicShaders.fromBrush(
|
|
||||||
Brush.verticalGradient(
|
|
||||||
listOf(
|
|
||||||
lineChartColor.copy(DefaultAlpha.LINE_BACKGROUND_SHADER_START),
|
|
||||||
lineChartColor.copy(DefaultAlpha.LINE_BACKGROUND_SHADER_END)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
},
|
|
||||||
targetVerticalAxisPosition = AxisPosition.Vertical.Start
|
|
||||||
)
|
|
||||||
|
|
||||||
val lineChartZaps =
|
|
||||||
lineChart(
|
|
||||||
lines = listOf(BitcoinOrange).map { lineChartColor ->
|
|
||||||
LineChart.LineSpec(
|
|
||||||
lineColor = lineChartColor.toArgb(),
|
|
||||||
lineBackgroundShader = DynamicShaders.fromBrush(
|
|
||||||
Brush.verticalGradient(
|
|
||||||
listOf(
|
|
||||||
lineChartColor.copy(DefaultAlpha.LINE_BACKGROUND_SHADER_START),
|
|
||||||
lineChartColor.copy(DefaultAlpha.LINE_BACKGROUND_SHADER_END)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
},
|
|
||||||
targetVerticalAxisPosition = AxisPosition.Vertical.End
|
|
||||||
)
|
|
||||||
|
|
||||||
if (showChart) {
|
if (showChart) {
|
||||||
val axisModel by model.axisLabels.collectAsState()
|
val lineChartCount =
|
||||||
val chartModel by model.chartModel.collectAsState()
|
lineChart(
|
||||||
chartModel?.let {
|
lines = listOf(RoyalBlue, Color.Green, Color.Red).map { lineChartColor ->
|
||||||
Row(
|
LineChart.LineSpec(
|
||||||
modifier = Modifier
|
lineColor = lineChartColor.toArgb(),
|
||||||
.padding(vertical = 10.dp, horizontal = 20.dp)
|
lineBackgroundShader = DynamicShaders.fromBrush(
|
||||||
.clickable(onClick = { showChart = !showChart })
|
Brush.verticalGradient(
|
||||||
) {
|
listOf(
|
||||||
ProvideChartStyle() {
|
lineChartColor.copy(DefaultAlpha.LINE_BACKGROUND_SHADER_START),
|
||||||
|
lineChartColor.copy(DefaultAlpha.LINE_BACKGROUND_SHADER_END)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
targetVerticalAxisPosition = AxisPosition.Vertical.Start
|
||||||
|
)
|
||||||
|
|
||||||
|
val lineChartZaps =
|
||||||
|
lineChart(
|
||||||
|
lines = listOf(BitcoinOrange).map { lineChartColor ->
|
||||||
|
LineChart.LineSpec(
|
||||||
|
lineColor = lineChartColor.toArgb(),
|
||||||
|
lineBackgroundShader = DynamicShaders.fromBrush(
|
||||||
|
Brush.verticalGradient(
|
||||||
|
listOf(
|
||||||
|
lineChartColor.copy(DefaultAlpha.LINE_BACKGROUND_SHADER_START),
|
||||||
|
lineChartColor.copy(DefaultAlpha.LINE_BACKGROUND_SHADER_END)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
targetVerticalAxisPosition = AxisPosition.Vertical.End
|
||||||
|
)
|
||||||
|
|
||||||
|
Row(
|
||||||
|
modifier = Modifier
|
||||||
|
.padding(vertical = 10.dp, horizontal = 20.dp)
|
||||||
|
.clickable(onClick = { showChart = !showChart })
|
||||||
|
) {
|
||||||
|
ProvideChartStyle() {
|
||||||
|
val axisModel by model.axisLabels.collectAsState()
|
||||||
|
val chartModel by model.chartModel.collectAsState()
|
||||||
|
chartModel?.let {
|
||||||
Chart(
|
Chart(
|
||||||
chart = remember(lineChartCount, lineChartZaps) {
|
chart = remember(lineChartCount, lineChartZaps) {
|
||||||
lineChartCount.plus(lineChartZaps)
|
lineChartCount.plus(lineChartZaps)
|
||||||
|
|||||||
Reference in New Issue
Block a user