Add default placeholders for feed icons
This commit is contained in:
parent
51b7ba73fd
commit
b943822194
@ -12,8 +12,10 @@ import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import coil.compose.AsyncImage
|
||||
import com.readrops.app.compose.R
|
||||
import com.readrops.app.compose.util.theme.ShortSpacer
|
||||
import com.readrops.app.compose.util.theme.spacing
|
||||
import com.readrops.app.compose.util.toDp
|
||||
@ -43,6 +45,7 @@ fun FeedItem(
|
||||
) {
|
||||
AsyncImage(
|
||||
model = feed.iconUrl,
|
||||
error = painterResource(id = R.drawable.ic_rss_feed_grey),
|
||||
contentDescription = feed.name!!,
|
||||
modifier = Modifier.size(MaterialTheme.typography.bodyLarge.toDp())
|
||||
)
|
||||
|
@ -74,7 +74,8 @@ fun TimelineItem(
|
||||
) {
|
||||
AsyncImage(
|
||||
model = itemWithFeed.feedIconUrl,
|
||||
contentDescription = null,
|
||||
error = painterResource(id = R.drawable.ic_rss_feed_grey),
|
||||
contentDescription = itemWithFeed.feedName,
|
||||
placeholder = painterResource(R.drawable.ic_rss_feed_grey),
|
||||
modifier = Modifier.size(24.dp)
|
||||
)
|
||||
|
@ -125,6 +125,7 @@ fun DrawerFolderItem(
|
||||
AsyncImage(
|
||||
model = feed.iconUrl,
|
||||
contentDescription = feed.name,
|
||||
error = painterResource(id = R.drawable.ic_rss_feed_grey),
|
||||
placeholder = painterResource(id = R.drawable.ic_folder_grey),
|
||||
modifier = Modifier.size(24.dp)
|
||||
)
|
||||
|
@ -98,6 +98,7 @@ fun TimelineDrawer(
|
||||
AsyncImage(
|
||||
model = feed.iconUrl,
|
||||
contentDescription = feed.name,
|
||||
error = painterResource(id = R.drawable.ic_rss_feed_grey),
|
||||
placeholder = painterResource(id = R.drawable.ic_folder_grey),
|
||||
modifier = Modifier.size(24.dp)
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user