Add default placeholders for feed icons

This commit is contained in:
Shinokuni 2024-03-28 11:54:20 +01:00
parent 51b7ba73fd
commit b943822194
4 changed files with 7 additions and 1 deletions

View File

@ -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())
)

View File

@ -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)
)

View File

@ -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)
)

View File

@ -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)
)