mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 22:03:55 +01:00
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:
parent
869371b485
commit
8de57304bf
44 changed files with 1738 additions and 1988 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue