Convert bookmarks package to kotlin (#6387)

* Convert BookmarkItemsController to kotlin

* Split BookmarkItemsDao apart and converted to Kotlin

* Convert and cleanup content providers

* Convert BookmarkItemsFragment to kotlin

* Convert BookmarkPicturesFragment to kotlin

* Convert BookmarkPicturesDao to kotlin and share some useful DB methods

* Convert BookmarkPicturesController to kotlin

* Convert BookmarkFragment to kotlin

* Convert BookmarksPagerAdapter to kotlin

* Convert BookmarkListRootFragment to kotlin
This commit is contained in:
Paul Hawke 2025-07-31 18:26:16 -05:00 committed by GitHub
parent 869371b485
commit 8de57304bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
44 changed files with 1738 additions and 1988 deletions

View file

@ -166,7 +166,7 @@ class MediaDetailPagerFragment : CommonsDaggerSupportFragment(), OnPageChangeLis
val mediaDetailFragment = adapter!!.currentMediaDetailFragment
when (item.itemId) {
R.id.menu_bookmark_current_image -> {
val bookmarkExists = bookmarkDao!!.updateBookmark(bookmark)
val bookmarkExists = bookmarkDao!!.updateBookmark(bookmark!!)
val snackbar = if (bookmarkExists) Snackbar.make(
requireView(),
R.string.add_bookmark,
@ -436,7 +436,7 @@ ${m.pageTitle.canonicalUri}"""
bookmark = Bookmark(
m.filename,
m.getAuthorOrUser(),
BookmarkPicturesContentProvider.uriForName(m.filename)
BookmarkPicturesContentProvider.uriForName(m.filename!!)
)
updateBookmarkState(menu.findItem(R.id.menu_bookmark_current_image))
val contributionState = provider.getContributionStateAt(position)