Hiding the badge on reading all.

This commit is contained in:
Amine 2017-07-27 21:51:33 +02:00 committed by Amine Bou
parent b7d5317b10
commit 170e575465
3 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,7 @@
**1.5.1.9**
- Hiding the unread badge when marking all items as read.
**1.5.1.8**
- Fixes and libs updates.

View File

@ -25,8 +25,8 @@ android {
applicationId "apps.amine.bou.readerforselfoss"
minSdkVersion 16
targetSdkVersion 26
versionCode 1518
versionName "1.5.1.8"
versionCode 1519
versionName "1.5.1.9"
// Enabling multidex support.
multiDexEnabled true

View File

@ -761,8 +761,10 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
api.readAll(ids).enqueue(object : Callback<SuccessResponse> {
override fun onResponse(call: Call<SuccessResponse>, response: Response<SuccessResponse>) {
if (response.body() != null && response.body()!!.isSuccess)
if (response.body() != null && response.body()!!.isSuccess) {
Toast.makeText(this@HomeActivity, R.string.all_posts_read, Toast.LENGTH_SHORT).show()
tabNewBadge.removeBadge()
}
else
Toast.makeText(this@HomeActivity, R.string.all_posts_not_read, Toast.LENGTH_SHORT).show()