kopia lustrzana https://github.com/vitorpamplona/amethyst
Improves Note's padding and click area.
rodzic
d676d57614
commit
c1d6d965cd
|
@ -40,15 +40,20 @@ import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
|
||||||
import nostr.postr.events.TextNoteEvent
|
import nostr.postr.events.TextNoteEvent
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun BoostSetCompose(likeSetCard: BoostSetCard, modifier: Modifier = Modifier, isInnerNote: Boolean = false, accountViewModel: AccountViewModel, navController: NavController) {
|
fun BoostSetCompose(likeSetCard: BoostSetCard, isInnerNote: Boolean = false, accountViewModel: AccountViewModel, navController: NavController) {
|
||||||
val noteState by likeSetCard.note.live.observeAsState()
|
val noteState by likeSetCard.note.live.observeAsState()
|
||||||
val note = noteState?.note
|
val note = noteState?.note
|
||||||
|
|
||||||
if (note?.event == null) {
|
if (note?.event == null) {
|
||||||
BlankNote(modifier, isInnerNote)
|
BlankNote(Modifier, isInnerNote)
|
||||||
} else {
|
} else {
|
||||||
Column(modifier = modifier) {
|
Column() {
|
||||||
Row(modifier = Modifier.padding(horizontal = if (!isInnerNote) 12.dp else 0.dp)) {
|
Row(modifier = Modifier
|
||||||
|
.padding(
|
||||||
|
start = if (!isInnerNote) 12.dp else 0.dp,
|
||||||
|
end = if (!isInnerNote) 12.dp else 0.dp,
|
||||||
|
top = 10.dp)
|
||||||
|
) {
|
||||||
|
|
||||||
// Draws the like picture outside the boosted card.
|
// Draws the like picture outside the boosted card.
|
||||||
if (!isInnerNote) {
|
if (!isInnerNote) {
|
||||||
|
|
|
@ -44,10 +44,15 @@ fun LikeSetCompose(likeSetCard: LikeSetCard, modifier: Modifier = Modifier, isIn
|
||||||
val note = noteState?.note
|
val note = noteState?.note
|
||||||
|
|
||||||
if (note?.event == null) {
|
if (note?.event == null) {
|
||||||
BlankNote(modifier, isInnerNote)
|
BlankNote(Modifier, isInnerNote)
|
||||||
} else {
|
} else {
|
||||||
Column(modifier = modifier) {
|
Column(modifier = modifier) {
|
||||||
Row(modifier = Modifier.padding(horizontal = if (!isInnerNote) 12.dp else 0.dp)) {
|
Row( modifier = Modifier
|
||||||
|
.padding(
|
||||||
|
start = if (!isInnerNote) 12.dp else 0.dp,
|
||||||
|
end = if (!isInnerNote) 12.dp else 0.dp,
|
||||||
|
top = 10.dp)
|
||||||
|
) {
|
||||||
|
|
||||||
// Draws the like picture outside the boosted card.
|
// Draws the like picture outside the boosted card.
|
||||||
if (!isInnerNote) {
|
if (!isInnerNote) {
|
||||||
|
|
|
@ -43,14 +43,13 @@ fun NoteCompose(baseNote: Note, modifier: Modifier = Modifier, isInnerNote: Bool
|
||||||
val authorState by note.author!!.live.observeAsState()
|
val authorState by note.author!!.live.observeAsState()
|
||||||
val author = authorState?.user
|
val author = authorState?.user
|
||||||
|
|
||||||
Column(modifier = modifier) {
|
Column(modifier = modifier.clickable ( onClick = { navController.navigate("Note/${note.idHex}") } )) {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(
|
.padding(
|
||||||
start = if (!isInnerNote) 12.dp else 0.dp,
|
start = if (!isInnerNote) 12.dp else 0.dp,
|
||||||
end = if (!isInnerNote) 12.dp else 0.dp,
|
end = if (!isInnerNote) 12.dp else 0.dp,
|
||||||
top = 10.dp)
|
top = 10.dp)
|
||||||
.clickable ( onClick = { navController.navigate("Note/${note.idHex}") } )
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
// Draws the boosted picture outside the boosted card.
|
// Draws the boosted picture outside the boosted card.
|
||||||
|
|
Ładowanie…
Reference in New Issue