Avoid remembering Modifier
This commit is contained in:
@@ -10,42 +10,25 @@ import androidx.compose.foundation.layout.Spacer
|
|||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.material3.Divider
|
import androidx.compose.material3.Divider
|
||||||
import androidx.compose.material3.ListItem
|
import androidx.compose.material3.ListItem
|
||||||
import androidx.compose.material3.LocalTextStyle
|
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.MutableState
|
|
||||||
import androidx.compose.runtime.derivedStateOf
|
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.runtime.mutableStateOf
|
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.layout.ContentScale
|
import androidx.compose.ui.layout.ContentScale
|
||||||
import androidx.compose.ui.platform.LocalContext
|
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.text.style.TextDirection
|
|
||||||
import androidx.compose.ui.text.style.TextOverflow
|
|
||||||
import androidx.compose.ui.tooling.preview.Preview
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
import com.vitorpamplona.amethyst.R
|
import com.vitorpamplona.amethyst.R
|
||||||
import com.vitorpamplona.amethyst.ui.components.RobohashFallbackAsyncImage
|
|
||||||
import com.vitorpamplona.amethyst.ui.note.NewItemsBubble
|
import com.vitorpamplona.amethyst.ui.note.NewItemsBubble
|
||||||
import com.vitorpamplona.amethyst.ui.note.NonClickableUserPictures
|
|
||||||
import com.vitorpamplona.amethyst.ui.note.RoomNameDisplay
|
|
||||||
import com.vitorpamplona.amethyst.ui.note.TimeAgo
|
import com.vitorpamplona.amethyst.ui.note.TimeAgo
|
||||||
import com.vitorpamplona.amethyst.ui.note.timeAgo
|
|
||||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
|
|
||||||
import com.vitorpamplona.amethyst.ui.theme.AccountPictureModifier
|
|
||||||
import com.vitorpamplona.amethyst.ui.theme.ChatHeadlineBorders
|
import com.vitorpamplona.amethyst.ui.theme.ChatHeadlineBorders
|
||||||
import com.vitorpamplona.amethyst.ui.theme.DividerThickness
|
import com.vitorpamplona.amethyst.ui.theme.DividerThickness
|
||||||
import com.vitorpamplona.amethyst.ui.theme.DoubleHorzSpacer
|
import com.vitorpamplona.amethyst.ui.theme.DoubleHorzSpacer
|
||||||
import com.vitorpamplona.amethyst.ui.theme.Height4dpModifier
|
import com.vitorpamplona.amethyst.ui.theme.Height4dpModifier
|
||||||
import com.vitorpamplona.amethyst.ui.theme.Size55Modifier
|
import com.vitorpamplona.amethyst.ui.theme.Size55Modifier
|
||||||
import com.vitorpamplona.amethyst.ui.theme.Size55dp
|
|
||||||
import com.vitorpamplona.amethyst.ui.theme.StdTopPadding
|
import com.vitorpamplona.amethyst.ui.theme.StdTopPadding
|
||||||
import com.vitorpamplona.amethyst.ui.theme.grayText
|
|
||||||
import com.vitorpamplona.quartz.events.ChatroomKey
|
|
||||||
import com.vitorpamplona.quartz.utils.TimeUtils
|
import com.vitorpamplona.quartz.utils.TimeUtils
|
||||||
|
|
||||||
@SuppressLint("UnrememberedMutableState")
|
@SuppressLint("UnrememberedMutableState")
|
||||||
@@ -74,7 +57,6 @@ fun ChannelNamePreview() {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onClick = {
|
onClick = {
|
||||||
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -128,7 +110,6 @@ fun ChatHeaderLayout(
|
|||||||
) {
|
) {
|
||||||
firstRow()
|
firstRow()
|
||||||
|
|
||||||
|
|
||||||
Spacer(modifier = Height4dpModifier)
|
Spacer(modifier = Height4dpModifier)
|
||||||
|
|
||||||
secondRow()
|
secondRow()
|
||||||
@@ -140,4 +121,4 @@ fun ChatHeaderLayout(
|
|||||||
thickness = DividerThickness
|
thickness = DividerThickness
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,4 +159,4 @@ val IconRowModifier = Modifier
|
|||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(vertical = 15.dp, horizontal = 25.dp)
|
.padding(vertical = 15.dp, horizontal = 25.dp)
|
||||||
|
|
||||||
val emptyLineItemModifier = Modifier.height(Size75dp).fillMaxWidth()
|
val emptyLineItemModifier = Modifier.height(Size75dp).fillMaxWidth()
|
||||||
|
|||||||
Reference in New Issue
Block a user