Reenabled Notch support

+ Text fix + clearing new chapters notifcation if user manually goes to updates screen
This commit is contained in:
Jay 2019-11-02 02:19:05 -07:00
parent 2681ff3c9a
commit fee4328ad0
3 changed files with 6 additions and 4 deletions

View File

@ -13,6 +13,7 @@ import eu.davidea.flexibleadapter.items.IFlexible
import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.data.download.model.Download
import eu.kanade.tachiyomi.data.library.LibraryUpdateService import eu.kanade.tachiyomi.data.library.LibraryUpdateService
import eu.kanade.tachiyomi.data.notification.Notifications
import eu.kanade.tachiyomi.ui.base.controller.NoToolbarElevationController import eu.kanade.tachiyomi.ui.base.controller.NoToolbarElevationController
import eu.kanade.tachiyomi.ui.base.controller.NucleusController import eu.kanade.tachiyomi.ui.base.controller.NucleusController
import eu.kanade.tachiyomi.ui.base.controller.popControllerWithTag import eu.kanade.tachiyomi.ui.base.controller.popControllerWithTag
@ -20,6 +21,7 @@ import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
import eu.kanade.tachiyomi.ui.manga.MangaController import eu.kanade.tachiyomi.ui.manga.MangaController
import eu.kanade.tachiyomi.ui.reader.ReaderActivity import eu.kanade.tachiyomi.ui.reader.ReaderActivity
import eu.kanade.tachiyomi.util.RecyclerWindowInsetsListener import eu.kanade.tachiyomi.util.RecyclerWindowInsetsListener
import eu.kanade.tachiyomi.util.notificationManager
import eu.kanade.tachiyomi.util.snack import eu.kanade.tachiyomi.util.snack
import eu.kanade.tachiyomi.util.toast import eu.kanade.tachiyomi.util.toast
import kotlinx.android.synthetic.main.recent_chapters_controller.* import kotlinx.android.synthetic.main.recent_chapters_controller.*
@ -68,7 +70,7 @@ class RecentChaptersController : NucleusController<RecentChaptersPresenter>(),
*/ */
override fun onViewCreated(view: View) { override fun onViewCreated(view: View) {
super.onViewCreated(view) super.onViewCreated(view)
view.context.notificationManager.cancel(Notifications.ID_NEW_CHAPTERS)
// Init RecyclerView and adapter // Init RecyclerView and adapter
val layoutManager = androidx.recyclerview.widget.LinearLayoutManager(view.context) val layoutManager = androidx.recyclerview.widget.LinearLayoutManager(view.context)
recycler.layoutManager = layoutManager recycler.layoutManager = layoutManager

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<!--<style name="Base.Theme.AppCompat" parent="@style/Base.V26.Theme.AppCompat" /> <style name="Base.Theme.AppCompat" parent="@style/Base.V26.Theme.AppCompat" />
<style name="Base.Theme.AppCompat.Light" parent="@style/Base.V26.Theme.AppCompat.Light" /> <style name="Base.Theme.AppCompat.Light" parent="@style/Base.V26.Theme.AppCompat.Light" />
<style name="Base.Widget.AppCompat.Toolbar" parent="@style/Base.V26.Widget.AppCompat.Toolbar" /> <style name="Base.Widget.AppCompat.Toolbar" parent="@style/Base.V26.Widget.AppCompat.Toolbar" />
<style name="Base.V26.Theme.AppCompat" parent="@style/Base.V23.Theme.AppCompat"> <style name="Base.V26.Theme.AppCompat" parent="@style/Base.V23.Theme.AppCompat">
@ -15,5 +15,5 @@
<item name="android:touchscreenBlocksFocus">true</item> <item name="android:touchscreenBlocksFocus">true</item>
<item name="android:keyboardNavigationCluster">true</item> <item name="android:keyboardNavigationCluster">true</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item> <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style> --> </style>
</resources> </resources>

View File

@ -50,7 +50,7 @@
<string name="action_remove_bookmark">Remove bookmark</string> <string name="action_remove_bookmark">Remove bookmark</string>
<string name="action_delete">Delete</string> <string name="action_delete">Delete</string>
<string name="action_update">Update</string> <string name="action_update">Update</string>
<string name="action_update_library">Update library</string> <string name="action_update_library">Updating library</string>
<string name="action_edit">Edit</string> <string name="action_edit">Edit</string>
<string name="action_add">Add</string> <string name="action_add">Add</string>
<string name="action_add_category">Add category</string> <string name="action_add_category">Add category</string>