mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 13:31:52 +01:00
Using bookmark icon for chapter bookmarking, heart for favoriting manga
This commit is contained in:
parent
3f31152968
commit
cb6de21804
@ -93,7 +93,7 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
|
||||
this.snackBar = snackBar
|
||||
canDismissSnackBar = false
|
||||
launchUI {
|
||||
delay(2000)
|
||||
delay(1000)
|
||||
if (this@MainActivity.snackBar == snackBar) {
|
||||
canDismissSnackBar = true
|
||||
}
|
||||
|
@ -142,8 +142,8 @@ class MangaHeaderHolder(
|
||||
icon = ContextCompat.getDrawable(
|
||||
itemView.context, when {
|
||||
item.isLocked -> R.drawable.ic_lock_white_24dp
|
||||
manga.favorite -> R.drawable.ic_bookmark_white_24dp
|
||||
else -> R.drawable.ic_add_to_library_24dp
|
||||
manga.favorite -> R.drawable.ic_heart_24dp
|
||||
else -> R.drawable.ic_heart_outline_24dp
|
||||
}
|
||||
)
|
||||
text = itemView.resources.getString(
|
||||
|
@ -86,8 +86,8 @@ class ChapterHolder(
|
||||
)
|
||||
bookmark.setImageDrawable(
|
||||
ContextCompat.getDrawable(
|
||||
read.context, if (item.bookmark) R.drawable.star_off
|
||||
else R.drawable.star
|
||||
read.context, if (item.bookmark) R.drawable.ic_bookmark_off_24dp
|
||||
else R.drawable.ic_bookmark_24dp
|
||||
)
|
||||
)
|
||||
}
|
||||
|
@ -364,7 +364,8 @@ class RecentsController(bundle: Bundle? = null) : BaseController(bundle),
|
||||
}
|
||||
|
||||
override fun showSheet() {
|
||||
dl_bottom_sheet.sheetBehavior?.state = BottomSheetBehavior.STATE_EXPANDED
|
||||
if (dl_bottom_sheet.sheetBehavior?.isHideable == false || presenter.downloadManager.hasQueue())
|
||||
dl_bottom_sheet.sheetBehavior?.state = BottomSheetBehavior.STATE_EXPANDED
|
||||
}
|
||||
|
||||
override fun toggleSheet() {
|
||||
|
@ -30,7 +30,7 @@ import kotlin.math.abs
|
||||
class RecentsPresenter(
|
||||
val controller: RecentsController,
|
||||
val preferences: PreferencesHelper = Injekt.get(),
|
||||
private val downloadManager: DownloadManager = Injekt.get(),
|
||||
val downloadManager: DownloadManager = Injekt.get(),
|
||||
private val db: DatabaseHelper = Injekt.get()
|
||||
) : DownloadQueue.DownloadListener, LibraryServiceListener {
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
8
app/src/main/res/drawable/ic_bookmark_off_24dp.xml
Normal file
8
app/src/main/res/drawable/ic_bookmark_off_24dp.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<!-- drawable/bookmark_off.xml -->
|
||||
<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="#000" android:pathData="M20,20.72L18.73,22L16.78,20.05L12,18L5,21V8.27L2,5.27L3.28,4L20,20.72M19,17.16V5C19,3.89 18.1,3 17,3H7C6.41,3 5.89,3.27 5.5,3.68L19,17.16Z" />
|
||||
</vector>
|
9
app/src/main/res/drawable/ic_heart_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_heart_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<!-- drawable/heart.xml -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path android:fillColor="#000" android:pathData="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z" />
|
||||
</vector>
|
8
app/src/main/res/drawable/ic_heart_outline_24dp.xml
Normal file
8
app/src/main/res/drawable/ic_heart_outline_24dp.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<!-- drawable/heart_outline.xml -->
|
||||
<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="#000" android:pathData="M12.1,18.55L12,18.65L11.89,18.55C7.14,14.24 4,11.39 4,8.5C4,6.5 5.5,5 7.5,5C9.04,5 10.54,6 11.07,7.36H12.93C13.46,6 14.96,5 16.5,5C18.5,5 20,6.5 20,8.5C20,11.39 16.86,14.24 12.1,18.55M16.5,3C14.76,3 13.09,3.81 12,5.08C10.91,3.81 9.24,3 7.5,3C4.42,3 2,5.41 2,8.5C2,12.27 5.4,15.36 10.55,20.03L12,21.35L13.45,20.03C18.6,15.36 22,12.27 22,8.5C22,5.41 19.58,3 16.5,3Z" />
|
||||
</vector>
|
@ -47,7 +47,7 @@
|
||||
android:layout_gravity="start|center"
|
||||
android:layout_marginStart="21dp"
|
||||
android:tint="@color/md_white_1000"
|
||||
android:src="@drawable/ic_bookmark_white_24dp" />
|
||||
android:src="@drawable/ic_bookmark_24dp" />
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
Loading…
Reference in New Issue
Block a user