Skip to content

Commit

Permalink
Added TAG TEAM to set browser filters for sm9+
Browse files Browse the repository at this point in the history
  • Loading branch information
r0adkll committed Feb 2, 2019
1 parent 3501b89 commit 4f19d5b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ class SetBrowserActivity : BaseActivity(), SetBrowserUi, SetBrowserUi.Intentions
"ENERGY" -> BrowseFilter.ENERGY
"GX" -> BrowseFilter.GX
"PRISM" -> BrowseFilter.PRISM
"TAG_TEAM" -> BrowseFilter.TAG_TEAM
else -> BrowseFilter.ALL
}
filterChanges.accept(filter)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@ class SetBrowserRenderer(
if (number?.let { it >= 5 && it != 35 } != true) {
filtersToHide += PRISM
}
if (number?.let { it >= 9 && it != 35 } != true) {
filtersToHide += TAG_TEAM
}
} else {
filtersToHide += GX
filtersToHide += PRISM
filtersToHide += TAG_TEAM
}

filtersToHide
Expand All @@ -70,6 +74,7 @@ class SetBrowserRenderer(
TRAINER -> it.supertype == SuperType.TRAINER
ENERGY -> it.supertype == SuperType.ENERGY
GX -> it.subtype == SubType.GX
TAG_TEAM -> it.subtype == SubType.TAG_TEAM
PRISM -> it.name.contains("")
} }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ interface SetBrowserUi : StateRenderer<SetBrowserUi.State> {
TRAINER,
ENERGY,
GX,
TAG_TEAM,
PRISM
}

Expand Down
8 changes: 8 additions & 0 deletions app/src/main/res/layout/activity_set_browser.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@
android:tag="GX"
/>

<com.google.android.material.tabs.TabItem
android:id="@+id/tabTagTeam"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/tab_tagteam"
android:tag="TAG_TEAM"
/>

<com.google.android.material.tabs.TabItem
android:id="@+id/tabPrism"
android:layout_width="match_parent"
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 @@ -260,4 +260,5 @@
<string name="pref_developer_resetpreview">Reset preview</string>
<string name="pref_developer_user_id_title">User Id</string>
<string name="intent_chooser_link_title">Open link...</string>
<string name="tab_tagteam">Tag Team</string>
</resources>

0 comments on commit 4f19d5b

Please sign in to comment.