mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-05 18:45:07 +01:00
Small new user improvements (#1143)
- Changed empty library string - Added empty view for Categories
This commit is contained in:
parent
0eae817aa6
commit
bdcc6e52e6
@ -107,9 +107,14 @@ class CategoryController : NucleusController<CategoryPresenter>(),
|
||||
fun setCategories(categories: List<CategoryItem>) {
|
||||
actionMode?.finish()
|
||||
adapter?.updateDataSet(categories)
|
||||
val selected = categories.filter { it.isSelected }
|
||||
if (selected.isNotEmpty()) {
|
||||
selected.forEach { onItemLongClick(categories.indexOf(it)) }
|
||||
if (categories.isNotEmpty()) {
|
||||
empty_view.hide()
|
||||
val selected = categories.filter { it.isSelected }
|
||||
if (selected.isNotEmpty()) {
|
||||
selected.forEach { onItemLongClick(categories.indexOf(it)) }
|
||||
}
|
||||
} else {
|
||||
empty_view.show(R.drawable.ic_shape_black_128dp, R.string.information_empty_category)
|
||||
}
|
||||
}
|
||||
|
||||
|
9
app/src/main/res/drawable/ic_shape_black_128dp.xml
Normal file
9
app/src/main/res/drawable/ic_shape_black_128dp.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="128dp"
|
||||
android:height="128dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M11,13.5V21.5H3V13.5H11M12,2L17.5,11H6.5L12,2M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13Z" />
|
||||
</vector>
|
@ -19,4 +19,11 @@
|
||||
app:srcCompat="@drawable/ic_add_white_24dp"
|
||||
style="@style/Theme.Widget.FAB"/>
|
||||
|
||||
<eu.kanade.tachiyomi.widget.EmptyView
|
||||
android:id="@+id/empty_view"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</FrameLayout>
|
@ -13,10 +13,12 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_label"
|
||||
android:layout_margin="16dp"
|
||||
style="@style/TextAppearance.Medium.Body2.Hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/image_view"
|
||||
android:gravity="center"
|
||||
android:layout_centerHorizontal="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
@ -1,7 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
<string name="label_recent_updates">تحديثات المكتبة</string>
|
||||
<string name="label_latest_updates">آخر التحديثات</string>
|
||||
<string name="label_categories">الأقسام</string>
|
||||
<string name="label_selected">المحدد</string>
|
||||
<string name="label_selected">%1$d المحدد</string>
|
||||
<string name="label_backup">النسخ الاحتياطي</string>
|
||||
|
||||
<string name="action_settings">اﻹعدادات</string>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<string name="label_settings">Instellingen</string>
|
||||
<string name="label_library">Mijn bibliotheek</string>
|
||||
<string name="label_recent_manga">Onlangs gelezen</string>
|
||||
<string name="label_catalogues">Catalogen</string>
|
||||
<string name="label_catalogues">Catalogi</string>
|
||||
<string name="label_latest_updates">Laatste updates</string>
|
||||
<string name="label_categories">Categorieën</string>
|
||||
<string name="label_selected">Geselecteerd: %1$d</string>
|
||||
@ -285,7 +285,8 @@
|
||||
|
||||
<string name="information_no_downloads">Geen downloads</string>
|
||||
<string name="information_no_recent">Geen recente hoofdstukken</string>
|
||||
<string name="information_empty_library">Bibliotheek leeg</string>
|
||||
<string name="information_empty_library">De bibliotheek is leeg, manga kunnen toegevoegd worden vanuit de catalogi.</string>
|
||||
<string name="information_empty_category">Er zijn nog geen categorieën, druk op de plus knop om een categorie aan te maken.</string>
|
||||
|
||||
<string name="download_notifier_downloader_title">Downloader</string>
|
||||
<string name="download_notifier_title_error">Error</string>
|
||||
|
@ -431,7 +431,8 @@
|
||||
<string name="information_no_downloads">No downloads</string>
|
||||
<string name="information_no_recent">No recent chapters</string>
|
||||
<string name="information_no_recent_manga">No recently read manga</string>
|
||||
<string name="information_empty_library">Empty library</string>
|
||||
<string name="information_empty_library">Your library is empty, you can add series to your library from the Catalogues.</string>
|
||||
<string name="information_empty_category">You have no categories. Hit the plus button to create one for organizing your library.</string>
|
||||
|
||||
<!-- Download Notification -->
|
||||
<string name="download_notifier_downloader_title">Downloader</string>
|
||||
|
Loading…
Reference in New Issue
Block a user