parent
2d3c297726
commit
758661f5fb
@ -1,4 +1,4 @@
|
|||||||
**1.5.0.3 to 1.5.0.5**
|
**1.5.0.3 to 1.5.0.6**
|
||||||
|
|
||||||
- Added a drawer for filtering sources and tags.
|
- Added a drawer for filtering sources and tags.
|
||||||
|
|
||||||
|
@ -25,8 +25,8 @@ android {
|
|||||||
applicationId "apps.amine.bou.readerforselfoss"
|
applicationId "apps.amine.bou.readerforselfoss"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
versionCode 1505
|
versionCode 1506
|
||||||
versionName "1.5.0.5"
|
versionName "1.5.0.6"
|
||||||
|
|
||||||
// Enabling multidex support.
|
// Enabling multidex support.
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
@ -167,7 +167,7 @@ class HomeActivity : AppCompatActivity() {
|
|||||||
.withAboutIconShown(true)
|
.withAboutIconShown(true)
|
||||||
.withAboutVersionShown(true)
|
.withAboutVersionShown(true)
|
||||||
.start(this@HomeActivity)
|
.start(this@HomeActivity)
|
||||||
false
|
true
|
||||||
})
|
})
|
||||||
drawer!!.addStickyFooterItem(
|
drawer!!.addStickyFooterItem(
|
||||||
PrimaryDrawerItem()
|
PrimaryDrawerItem()
|
||||||
@ -175,7 +175,7 @@ class HomeActivity : AppCompatActivity() {
|
|||||||
.withIcon(R.drawable.ic_settings)
|
.withIcon(R.drawable.ic_settings)
|
||||||
.withOnDrawerItemClickListener { _, _, _ ->
|
.withOnDrawerItemClickListener { _, _, _ ->
|
||||||
startActivityForResult(Intent(this@HomeActivity, SettingsActivity::class.java), MENU_PREFERENCES)
|
startActivityForResult(Intent(this@HomeActivity, SettingsActivity::class.java), MENU_PREFERENCES)
|
||||||
false
|
true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ class HomeActivity : AppCompatActivity() {
|
|||||||
fun handleTags(maybeTags: List<Tag>?) {
|
fun handleTags(maybeTags: List<Tag>?) {
|
||||||
if (maybeTags == null) {
|
if (maybeTags == null) {
|
||||||
if (loadedFromCache)
|
if (loadedFromCache)
|
||||||
drawer!!.addItem(PrimaryDrawerItem().withName(getString(R.string.drawer_error_loading_tags)))
|
drawer!!.addItem(PrimaryDrawerItem().withName(getString(R.string.drawer_error_loading_tags)).withSelectable(false))
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (tag in maybeTags) {
|
for (tag in maybeTags) {
|
||||||
@ -213,7 +213,7 @@ class HomeActivity : AppCompatActivity() {
|
|||||||
fun handleSources(maybeSources: List<Sources>?) {
|
fun handleSources(maybeSources: List<Sources>?) {
|
||||||
if (maybeSources == null) {
|
if (maybeSources == null) {
|
||||||
if (loadedFromCache)
|
if (loadedFromCache)
|
||||||
drawer!!.addItem(PrimaryDrawerItem().withName(getString(R.string.drawer_error_loading_sources)))
|
drawer!!.addItem(PrimaryDrawerItem().withName(getString(R.string.drawer_error_loading_sources)).withSelectable(false))
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
for (tag in maybeSources)
|
for (tag in maybeSources)
|
||||||
@ -234,6 +234,7 @@ class HomeActivity : AppCompatActivity() {
|
|||||||
drawer!!.addItem(
|
drawer!!.addItem(
|
||||||
PrimaryDrawerItem()
|
PrimaryDrawerItem()
|
||||||
.withName(getString(R.string.drawer_item_filters))
|
.withName(getString(R.string.drawer_item_filters))
|
||||||
|
.withSelectable(false)
|
||||||
.withIdentifier(DRAWER_ID_FILTERS)
|
.withIdentifier(DRAWER_ID_FILTERS)
|
||||||
.withBadge(getString(R.string.drawer_action_clear))
|
.withBadge(getString(R.string.drawer_action_clear))
|
||||||
.withOnDrawerItemClickListener { _, _, _ ->
|
.withOnDrawerItemClickListener { _, _, _ ->
|
||||||
@ -249,6 +250,7 @@ class HomeActivity : AppCompatActivity() {
|
|||||||
.withName(getString(R.string.drawer_item_sources))
|
.withName(getString(R.string.drawer_item_sources))
|
||||||
.withIdentifier(DRAWER_ID_TAGS)
|
.withIdentifier(DRAWER_ID_TAGS)
|
||||||
.withBadge(getString(R.string.drawer_action_edit))
|
.withBadge(getString(R.string.drawer_action_edit))
|
||||||
|
.withSelectable(false)
|
||||||
.withOnDrawerItemClickListener { _, _, _ ->
|
.withOnDrawerItemClickListener { _, _, _ ->
|
||||||
startActivity(Intent(this, SourcesActivity::class.java))
|
startActivity(Intent(this, SourcesActivity::class.java))
|
||||||
false
|
false
|
||||||
@ -257,8 +259,6 @@ class HomeActivity : AppCompatActivity() {
|
|||||||
handleSources(maybeDrawerData.sources)
|
handleSources(maybeDrawerData.sources)
|
||||||
|
|
||||||
|
|
||||||
drawer!!.addItem(DividerDrawerItem())
|
|
||||||
|
|
||||||
if (!loadedFromCache)
|
if (!loadedFromCache)
|
||||||
Reservoir.putAsync("drawerData", maybeDrawerData, object : ReservoirPutCallback {
|
Reservoir.putAsync("drawerData", maybeDrawerData, object : ReservoirPutCallback {
|
||||||
override fun onSuccess() {}
|
override fun onSuccess() {}
|
||||||
|
Loading…
Reference in New Issue
Block a user