Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mickael-menu committed Aug 21, 2024
1 parent d5c777f commit 53f6303
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import android.webkit.URLUtil
import java.io.InputStream
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.readium.r2.shared.InternalReadiumApi
import org.readium.r2.shared.extensions.read
import org.readium.r2.shared.extensions.tryOrLog
import org.readium.r2.shared.publication.Link
Expand All @@ -33,6 +34,7 @@ import timber.log.Timber
* @param client HTTP client used to perform HTTP requests.
* @param baseUrl Base URL from which relative HREF are served.
*/
@OptIn(InternalReadiumApi::class)
class HttpFetcher(
private val client: HttpClient,
private val baseUrl: String? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,12 +361,12 @@ abstract class VisualReaderFragment : BaseReaderFragment(), VisualNavigator.List

private fun showHighlightPopupWithStyle(style: Highlight.Style) =
viewLifecycleOwner.lifecycleScope.launch {
// Get the rect of the current selection to know where to position the highlight
// popup.
(navigator as? SelectableNavigator)?.currentSelection()?.rect?.let { selectionRect ->
showHighlightPopup(selectionRect, style)
// Get the rect of the current selection to know where to position the highlight
// popup.
(navigator as? SelectableNavigator)?.currentSelection()?.rect?.let { selectionRect ->
showHighlightPopup(selectionRect, style)
}
}
}

private fun showHighlightPopup(rect: RectF, style: Highlight.Style, highlightId: Long? = null) =
viewLifecycleOwner.lifecycleScope.launch {
Expand Down

0 comments on commit 53f6303

Please sign in to comment.