Skip to content

Conversation

@sandersantema
Copy link
Contributor

Alternatively it could also be simplified to:

infoContent.append("\(artists.count) Artist" + (artists.count > 1 ? "s" : ""))

@sandersantema
Copy link
Contributor Author

I just discovered that this code is repeated in Artist.swift as well, I suppose it might be better to apply this change to all the files which share this code and possibly even better to abstract all the things Genre.swift, Artist.swift and possibly others share to a class or struct but that would require more swift knowledge which I currently don't have.

@BLeeEZ
Copy link
Owner

BLeeEZ commented Apr 1, 2022

Cool, but a small change is required. If the count is zero no info should be appended to infoContent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants