Center the text of notes that couldn't be found.
This commit is contained in:
@@ -84,7 +84,7 @@ fun BadgeCompose(
|
||||
val scope = rememberCoroutineScope()
|
||||
|
||||
if (note == null) {
|
||||
BlankNote(Modifier, isInnerNote)
|
||||
BlankNote(Modifier, !isInnerNote)
|
||||
} else {
|
||||
val defaultBackgroundColor = MaterialTheme.colorScheme.background
|
||||
val backgroundColor = remember { mutableStateOf<Color>(defaultBackgroundColor) }
|
||||
|
||||
@@ -36,6 +36,7 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.vitorpamplona.amethyst.R
|
||||
@@ -62,7 +63,7 @@ fun BlankNotePreview() {
|
||||
@Composable
|
||||
fun BlankNote(
|
||||
modifier: Modifier = Modifier,
|
||||
showDivider: Boolean = false,
|
||||
showDivider: Boolean = true,
|
||||
idHex: String? = null,
|
||||
) {
|
||||
Column(modifier = modifier) {
|
||||
@@ -74,7 +75,7 @@ fun BlankNote(
|
||||
start = 20.dp,
|
||||
end = 20.dp,
|
||||
bottom = 8.dp,
|
||||
top = 15.dp,
|
||||
top = 8.dp,
|
||||
),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.Center,
|
||||
@@ -83,10 +84,11 @@ fun BlankNote(
|
||||
text = stringResource(R.string.post_not_found) + if (idHex != null) ": $idHex" else "",
|
||||
modifier = Modifier.padding(30.dp),
|
||||
color = Color.Gray,
|
||||
textAlign = TextAlign.Center,
|
||||
)
|
||||
}
|
||||
|
||||
if (!showDivider) {
|
||||
if (showDivider) {
|
||||
HorizontalDivider(
|
||||
modifier = Modifier.padding(vertical = 10.dp),
|
||||
thickness = DividerThickness,
|
||||
|
||||
@@ -217,7 +217,7 @@ fun NoteCompose(
|
||||
onLongClick = showPopup,
|
||||
)
|
||||
},
|
||||
isBoostedNote || isQuotedNote,
|
||||
!isBoostedNote && !isQuotedNote,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,6 +231,20 @@ private fun FeedLoaded(
|
||||
nav = nav,
|
||||
)
|
||||
}
|
||||
|
||||
/*var see by
|
||||
remember {
|
||||
mutableStateOf(false)
|
||||
}
|
||||
|
||||
if (see) {
|
||||
} else {
|
||||
Row(defaultModifier) {
|
||||
Button(onClick = { see = true }) {
|
||||
Text("Show")
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user