Address some build warnings

This commit is contained in:
arkon 2022-05-11 18:08:49 -04:00
parent 598e4516b3
commit b950370f12
8 changed files with 13 additions and 6 deletions

View file

@ -37,7 +37,7 @@ fun SourceFilterScreen(
when (state) {
is SourceFilterState.Loading -> LoadingScreen()
is SourceFilterState.Error -> Text(text = (state as SourceFilterState.Error).error!!.message!!)
is SourceFilterState.Error -> Text(text = (state as SourceFilterState.Error).error.message!!)
is SourceFilterState.Success ->
SourceFilterContent(
nestedScrollInterop = nestedScrollInterop,

View file

@ -52,6 +52,7 @@ internal class ExtensionInstallReceiver(private val listener: Listener) :
when (val result = getExtensionFromIntent(context, intent)) {
is LoadResult.Success -> listener.onExtensionInstalled(result.extension)
is LoadResult.Untrusted -> listener.onExtensionUntrusted(result.extension)
else -> {}
}
}
}
@ -60,8 +61,8 @@ internal class ExtensionInstallReceiver(private val listener: Listener) :
when (val result = getExtensionFromIntent(context, intent)) {
is LoadResult.Success -> listener.onExtensionUpdated(result.extension)
// Not needed as a package can't be upgraded if the signature is different
is LoadResult.Untrusted -> {
}
// is LoadResult.Untrusted -> {}
else -> {}
}
}
}

View file

@ -52,13 +52,13 @@ class MigrationSourcesController : ComposeController<MigrationSourcesPresenter>(
}
R.id.asc_alphabetical,
R.id.desc_alphabetical,
-> {
-> {
presenter.setAlphabeticalSorting(itemId == R.id.asc_alphabetical)
true
}
R.id.asc_count,
R.id.desc_count,
-> {
-> {
presenter.setTotalSorting(itemId == R.id.asc_count)
true
}

View file

@ -358,6 +358,7 @@ open class BrowseSourceController(bundle: Bundle) :
when (filter) {
is Filter.TriState -> filter.state = 1
is Filter.CheckBox -> filter.state = true
else -> {}
}
filterList = presenter.sourceFilters
break@filter

View file

@ -394,6 +394,7 @@ class LibrarySettingsSheet(
unreadBadge -> preferences.unreadBadge().set((item.checked))
localBadge -> preferences.localBadge().set((item.checked))
languageBadge -> preferences.languageBadge().set((item.checked))
else -> {}
}
adapter.notifyItemChanged(item)
}
@ -418,6 +419,7 @@ class LibrarySettingsSheet(
when (item) {
showTabs -> preferences.categoryTabs().set(item.checked)
showNumberOfItems -> preferences.categoryNumberOfItems().set(item.checked)
else -> {}
}
adapter.notifyItemChanged(item)
}

View file

@ -113,6 +113,7 @@ class ChaptersSettingsSheet(
downloaded -> presenter.setDownloadedFilter(newState)
unread -> presenter.setUnreadFilter(newState)
bookmarked -> presenter.setBookmarkedFilter(newState)
else -> {}
}
initModels()

View file

@ -249,6 +249,7 @@ open class ReaderPageImageView @JvmOverloads constructor(
ZoomStartPosition.LEFT -> setScaleAndCenter(scale, PointF(0F, 0F))
ZoomStartPosition.RIGHT -> setScaleAndCenter(scale, PointF(sWidth.toFloat(), 0F))
ZoomStartPosition.CENTER -> setScaleAndCenter(scale, center.also { it?.y = 0F })
null -> {}
}
}

View file

@ -91,7 +91,8 @@ class TachiyomiBottomNavigationView @JvmOverloads constructor(
currentAnimator = null
postInvalidate()
}
},)
},
)
}
internal class SavedState : AbsSavedState {