Compare commits

...

2 commits

Author SHA1 Message Date
Simon Tenbeitel
8398249de7 Only show navigation tabs when only default topic exists 2018-06-05 20:01:16 +02:00
Simon Tenbeitel
d43a3cc99e Only show navigation tabs for at least 2 passes
Closes #189
2018-05-29 21:21:00 +02:00

View file

@ -273,7 +273,8 @@ class PassListActivity : PassAndroidActivity() {
val empty = passStore.classifier.topicByIdMap.isEmpty()
emptyView.visibility = if (empty) View.VISIBLE else View.GONE
tab_layout.visibility = if (empty) View.GONE else View.VISIBLE
val onlyDefaultTopicExists = passStore.classifier.getTopics().all { it == getString(R.string.topic_new) }
tab_layout.visibility = if (onlyDefaultTopicExists) View.GONE else View.VISIBLE
}
private fun setupWithViewPagerIfNeeded() {