Skip to content

Commit

Permalink
Add nullability annotation to help with Kotlin conversion
Browse files Browse the repository at this point in the history
sictiru committed Aug 30, 2024
1 parent 8c96e3c commit ba1264f
Showing 4 changed files with 130 additions and 105 deletions.
Original file line number Diff line number Diff line change
@@ -388,7 +388,7 @@ abstract class Reading : NbActivity(), OnPageChangeListener, ScrollChangeListene
get() {
// saved stories and global shared stories don't have unreads
if (fs!!.isAllSaved || fs!!.isGlobalShared) return 0
val result = dbHelper.getUnreadCount(fs, intelState)
val result = dbHelper.getUnreadCount(fs!!, intelState)
return if (result < 0) 0 else result
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -434,8 +434,10 @@ class ReadingItemFragment : NbFragment(), PopupMenu.OnMenuItemClickListener {
}
R.id.menu_go_to_feed -> {
val feed = dbHelper.getFeed(story!!.feedId)
val fs = FeedSet.singleFeed(feed.feedId)
FeedItemsList.startActivity(requireContext(), fs, feed, null, null)
feed?.let {
val fs = FeedSet.singleFeed(it.feedId)
FeedItemsList.startActivity(requireContext(), fs, it, null, null)
}
true
}
else -> {
Original file line number Diff line number Diff line change
@@ -56,7 +56,7 @@ class SetupCommentSectionTask(private val fragment: ReadingItemFragment, view: V

private fun doInBackground() {
if (context == null || story == null || story.id.isNullOrEmpty()) return
comments.addAll(fragment.dbHelper.getComments(story.id))
comments.addAll(fragment.dbHelper.getComments(story.id!!))

// users by whom we saw non-pseudo comments
val commentingUserIds: MutableSet<String> = HashSet()

0 comments on commit ba1264f

Please sign in to comment.