* change add to library icon add toast

* adjusted toast messages
added toast to catalog long click

* adjusted strings
This commit is contained in:
Carlos 2018-01-08 08:08:48 -05:00 committed by Bram van de Kerkhof
parent 29d0cb4a15
commit 6027671c09
6 changed files with 29 additions and 9 deletions

View File

@ -476,6 +476,7 @@ open class BrowseCatalogueController(bundle: Bundle) :
0 -> { 0 -> {
presenter.changeMangaFavorite(manga) presenter.changeMangaFavorite(manga)
adapter?.notifyItemChanged(position) adapter?.notifyItemChanged(position)
activity?.toast(activity?.getString(R.string.manga_removed_library))
} }
} }
}.show() }.show()
@ -498,6 +499,7 @@ open class BrowseCatalogueController(bundle: Bundle) :
ChangeMangaCategoriesDialog(this, listOf(manga), categories, preselected) ChangeMangaCategoriesDialog(this, listOf(manga), categories, preselected)
.showDialog(router) .showDialog(router)
} }
activity?.toast(activity?.getString(R.string.manga_added_library))
} }
} }

View File

@ -242,7 +242,7 @@ class MangaInfoController : NucleusController<MangaInfoPresenter>(),
fab_favorite?.setImageResource(if (isFavorite) fab_favorite?.setImageResource(if (isFavorite)
R.drawable.ic_bookmark_white_24dp R.drawable.ic_bookmark_white_24dp
else else
R.drawable.ic_bookmark_border_white_24dp) R.drawable.ic_add_to_library_24dp)
} }
/** /**
@ -301,6 +301,9 @@ class MangaInfoController : NucleusController<MangaInfoPresenter>(),
.showDialog(router) .showDialog(router)
} }
} }
activity?.toast(activity?.getString(R.string.manga_added_library))
}else{
activity?.toast(activity?.getString(R.string.manga_removed_library))
} }
} }

View File

@ -0,0 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#FFFFFF" android:pathData="M17,18V5H7V18L12,15.82L17,18M17,3A2,2 0 0,1 19,5V21L12,18L5,21V5C5,3.89 5.9,3 7,3H17M11,7H13V9H15V11H13V13H11V11H9V9H11V7Z" />
</vector>

View File

@ -0,0 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#FFFFFF" android:pathData="M12,8A3,3 0 0,0 15,5A3,3 0 0,0 12,2A3,3 0 0,0 9,5A3,3 0 0,0 12,8M12,11.54C9.64,9.35 6.5,8 3,8V19C6.5,19 9.64,20.35 12,22.54C14.36,20.35 17.5,19 21,19V8C17.5,8 14.36,9.35 12,11.54Z" />
</vector>

View File

@ -58,7 +58,7 @@
<android.support.design.widget.FloatingActionButton <android.support.design.widget.FloatingActionButton
android:id="@+id/fab_favorite" android:id="@+id/fab_favorite"
style="@style/Theme.Widget.FAB" style="@style/Theme.Widget.FAB"
app:srcCompat="@drawable/ic_bookmark_border_white_24dp" app:srcCompat="@drawable/ic_add_to_library_24dp"
android:layout_marginTop="0dp" android:layout_marginTop="0dp"
android:layout_marginBottom="0dp" android:layout_marginBottom="0dp"
android:layout_marginRight="8dp" android:layout_marginRight="8dp"

View File

@ -299,8 +299,9 @@
<string name="ongoing">Ongoing</string> <string name="ongoing">Ongoing</string>
<string name="unknown">Unknown</string> <string name="unknown">Unknown</string>
<string name="licensed">Licensed</string> <string name="licensed">Licensed</string>
<string name="add_to_library">Add to library</string>
<string name="remove_from_library">Remove from library</string> <string name="remove_from_library">Remove from library</string>
<string name="manga_added_library">Added to library</string>
<string name="manga_removed_library">Removed from library</string>
<string name="manga_info_author_label">Author</string> <string name="manga_info_author_label">Author</string>
<string name="manga_info_artist_label">Artist</string> <string name="manga_info_artist_label">Artist</string>
<string name="manga_info_chapters_label">Chapters</string> <string name="manga_info_chapters_label">Chapters</string>