Skip to content

Commit

Permalink
Merge pull request #27 from HeroBrine1st/fix/add-contributor-tags-field
Browse files Browse the repository at this point in the history
Add "Contributor" tags
  • Loading branch information
HeroBrine1st authored Dec 20, 2024
2 parents 6fa25c3 + e0ea114 commit c56fb5c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
3 changes: 2 additions & 1 deletion app/src/main/java/ru/herobrine1st/e621/api/model/Tags.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ data class Tags(
val artist: List<Tag>,
val lore: List<Tag>,
val meta: List<Tag>,
val invalid: List<Tag>
val invalid: List<Tag>,
val contributor: List<Tag>
) {
val all by lazy {
artist + copyright + character + species + general + lore + meta + invalid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,13 @@ fun LazyListScope.tags(
onWikiClick: (Tag) -> Unit,
) {
tags(R.string.artist_tags, post.tags.artist, onModificationClick, onWikiClick)
tags(
R.string.copyright_tags,
post.tags.copyright,
onModificationClick,
onWikiClick
)
tags(
R.string.character_tags,
post.tags.character,
onModificationClick,
onWikiClick
)
tags(R.string.copyright_tags, post.tags.copyright, onModificationClick, onWikiClick)
tags(R.string.character_tags, post.tags.character, onModificationClick, onWikiClick)
tags(R.string.species_tags, post.tags.species, onModificationClick, onWikiClick)
tags(R.string.general_tags, post.tags.general, onModificationClick, onWikiClick)
tags(R.string.lore_tags, post.tags.lore, onModificationClick, onWikiClick)
tags(R.string.meta_tags, post.tags.meta, onModificationClick, onWikiClick)
tags(R.string.contributor_tags, post.tags.contributor, onModificationClick, onWikiClick)
}

@OptIn(ExperimentalFoundationApi::class)
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,5 @@ You should have received a copy of the GNU General Public License along with thi
<string name="about_build_info">Build info</string>
<string name="about_build_info_content">"Version: %1$s\nBuild type: %2$s\nUser-Agent: %3$s"</string>
<string name="blacklist_fetch_error">Couldn\'t fetch blacklist from user account</string>
<string name="contributor_tags">Contributor</string>
</resources>
1 change: 1 addition & 0 deletions app/src/test/java/ru/herobrine1st/e621/TagProcessorTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ val samplePost = """{
"conditional_dnp",
"tom_fischbach"
],
"contributor": [],
"invalid": [],
"lore": [],
"meta": [
Expand Down

0 comments on commit c56fb5c

Please sign in to comment.