* 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

@ -171,13 +171,13 @@ open class BrowseCatalogueController(bundle: Bundle) :
numColumnsSubscription?.unsubscribe()
var oldPosition = RecyclerView.NO_POSITION
val oldRecycler = catalogue_view?.getChildAt(1)
if (oldRecycler is RecyclerView) {
oldPosition = (oldRecycler.layoutManager as LinearLayoutManager).findFirstVisibleItemPosition()
oldRecycler.adapter = null
val oldRecycler = catalogue_view?.getChildAt(1)
if (oldRecycler is RecyclerView) {
oldPosition = (oldRecycler.layoutManager as LinearLayoutManager).findFirstVisibleItemPosition()
oldRecycler.adapter = null
catalogue_view?.removeView(oldRecycler)
}
catalogue_view?.removeView(oldRecycler)
}
val recycler = if (presenter.isListMode) {
RecyclerView(view.context).apply {
@ -476,6 +476,7 @@ open class BrowseCatalogueController(bundle: Bundle) :
0 -> {
presenter.changeMangaFavorite(manga)
adapter?.notifyItemChanged(position)
activity?.toast(activity?.getString(R.string.manga_removed_library))
}
}
}.show()
@ -498,6 +499,7 @@ open class BrowseCatalogueController(bundle: Bundle) :
ChangeMangaCategoriesDialog(this, listOf(manga), categories, preselected)
.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)
R.drawable.ic_bookmark_white_24dp
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)
}
}
activity?.toast(activity?.getString(R.string.manga_added_library))
}else{
activity?.toast(activity?.getString(R.string.manga_removed_library))
}
}