Skip to content

Commit

Permalink
feat: add icon for url throughout app
Browse files Browse the repository at this point in the history
resolves #349
  • Loading branch information
David Ly committed Aug 16, 2023
1 parent feca17c commit 922fc13
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,10 @@ internal fun LazyListScope.addRelationshipsSection(
Row(
verticalAlignment = Alignment.CenterVertically
) {
if (linkedEntity == MusicBrainzEntity.URL) {
Spacer(modifier = Modifier.padding(end = 32.dp))
} else {
EntityIcon(
modifier = Modifier.padding(end = 8.dp),
entity = linkedEntity
)
}
EntityIcon(
modifier = Modifier.padding(end = 8.dp),
entity = linkedEntity
)
Text(
style = TextStyles.getCardBodySubTextStyle(),
text = "${stringResource(id = linkedEntity.getDisplayTextRes())}: ${relationTypeCount.count}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import androidx.compose.material.icons.filled.CollectionsBookmark
import androidx.compose.material.icons.filled.CorporateFare
import androidx.compose.material.icons.filled.Event
import androidx.compose.material.icons.filled.Folder
import androidx.compose.material.icons.filled.Link
import androidx.compose.material.icons.filled.List
import androidx.compose.material.icons.filled.Mic
import androidx.compose.material.icons.filled.MusicNote
Expand Down Expand Up @@ -56,8 +57,8 @@ fun MusicBrainzEntity.getIcon(): ImageVector? {
MusicBrainzEntity.RELEASE_GROUP -> Icons.Default.Folder
MusicBrainzEntity.SERIES -> Icons.Default.List
MusicBrainzEntity.WORK -> Icons.Default.MusicNote
MusicBrainzEntity.URL -> Icons.Default.Link
else -> {
// Non-searchable entities like Genre, URL
// No icons.
null
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 922fc13

Please sign in to comment.