Small enhancements

This commit is contained in:
Koitharu
2020-05-20 19:51:28 +03:00
parent c1c2b11bd8
commit e38e5fdf0f
4 changed files with 7 additions and 2 deletions

View File

@@ -123,6 +123,7 @@ class ChaptersFragment : BaseFragment(R.layout.fragment_chapters), MangaDetailsV
manga ?: return false,
adapter.checkedItemsIds
)
mode.finish()
true
}
R.id.action_select_all -> {

View File

@@ -104,6 +104,8 @@ class MangaDetailsActivity : BaseActivity(), MangaDetailsView,
manga?.source != null && manga?.source != MangaSource.LOCAL
menu.findItem(R.id.action_delete).isVisible =
manga?.source == MangaSource.LOCAL
menu.findItem(R.id.action_browser).isVisible =
manga?.source != MangaSource.LOCAL
menu.findItem(R.id.action_shortcut).isVisible =
ShortcutManagerCompat.isRequestPinShortcutSupported(this)
return super.onPrepareOptionsMenu(menu)

View File

@@ -152,6 +152,7 @@ class TrackWorker(context: Context, workerParams: WorkerParameters) :
intent, PendingIntent.FLAG_UPDATE_CURRENT))
setAutoCancel(true)
color = colorPrimary
setShortcutId(manga.id.toString())
priority = NotificationCompat.PRIORITY_DEFAULT
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
builder.setSound(settings.notificationSound.toUriOrNull())

View File

@@ -1,17 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="4dp"
app:tabGravity="center"
app:tabMode="scrollable"/>
app:tabMode="scrollable" />
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/pager"