Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
1d18c898b2 | |||
95e208000f |
@ -1,3 +1,7 @@
|
|||||||
|
**1.5.1.3**
|
||||||
|
|
||||||
|
- Fixes introduces by the previous alpha (1.5.1.2)
|
||||||
|
|
||||||
**1.5.1.2**
|
**1.5.1.2**
|
||||||
|
|
||||||
- Added testing to the CI.
|
- Added testing to the CI.
|
||||||
|
@ -25,8 +25,8 @@ android {
|
|||||||
applicationId "apps.amine.bou.readerforselfoss"
|
applicationId "apps.amine.bou.readerforselfoss"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
versionCode 1512
|
versionCode 1513
|
||||||
versionName "1.5.1.2"
|
versionName "1.5.1.3"
|
||||||
|
|
||||||
// Enabling multidex support.
|
// Enabling multidex support.
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
@ -194,6 +194,8 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
}
|
}
|
||||||
tabNew.setBadgeCount(items.size - 1)
|
tabNew.setBadgeCount(items.size - 1)
|
||||||
|
|
||||||
|
mayBeEmpty()
|
||||||
|
|
||||||
} catch (e: IndexOutOfBoundsException) {}
|
} catch (e: IndexOutOfBoundsException) {}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -502,6 +504,15 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun mayBeEmpty() =
|
||||||
|
if (items.isEmpty()) {
|
||||||
|
emptyText.visibility = View.VISIBLE
|
||||||
|
mRecyclerView.visibility = View.GONE
|
||||||
|
} else {
|
||||||
|
emptyText.visibility = View.GONE
|
||||||
|
mRecyclerView.visibility = View.VISIBLE
|
||||||
|
}
|
||||||
|
|
||||||
private fun getElementsAccordingToTab() =
|
private fun getElementsAccordingToTab() =
|
||||||
when (elementsShown) {
|
when (elementsShown) {
|
||||||
UNREAD_SHOWN -> getUnRead()
|
UNREAD_SHOWN -> getUnRead()
|
||||||
@ -522,13 +533,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
}
|
}
|
||||||
if (didUpdate)
|
if (didUpdate)
|
||||||
handleListResult()
|
handleListResult()
|
||||||
if (items.isEmpty()) {
|
mayBeEmpty()
|
||||||
emptyText.visibility = View.VISIBLE
|
|
||||||
mRecyclerView.visibility = View.GONE
|
|
||||||
} else {
|
|
||||||
emptyText.visibility = View.GONE
|
|
||||||
mRecyclerView.visibility = View.VISIBLE
|
|
||||||
}
|
|
||||||
mSwipeRefreshLayout.isRefreshing = false
|
mSwipeRefreshLayout.isRefreshing = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,8 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
android:background="@color/background_grey">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/emptyText"
|
android:id="@+id/emptyText"
|
||||||
@ -85,12 +86,13 @@
|
|||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Headline"
|
android:textAppearance="@style/TextAppearance.AppCompat.Headline"
|
||||||
android:textColor="@color/about_libraries_card_dark"
|
android:textColor="@color/about_libraries_card_dark"
|
||||||
|
android:background="@color/transparent"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
<android.support.v7.widget.RecyclerView
|
<android.support.v7.widget.RecyclerView
|
||||||
android:id="@+id/my_recycler_view"
|
android:id="@+id/my_recycler_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/background_grey"
|
android:background="@color/transparent"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:scrollbars="vertical"
|
android:scrollbars="vertical"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||||
|
Reference in New Issue
Block a user