Update prasers
This commit is contained in:
@@ -14,8 +14,8 @@ android {
|
|||||||
applicationId 'org.koitharu.kotatsu'
|
applicationId 'org.koitharu.kotatsu'
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 32
|
targetSdkVersion 32
|
||||||
versionCode 418
|
versionCode 419
|
||||||
versionName '3.4.6'
|
versionName '3.4.7'
|
||||||
generatedDensities = []
|
generatedDensities = []
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ afterEvaluate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation('com.github.nv95:kotatsu-parsers:fadb06aabb') {
|
implementation('com.github.nv95:kotatsu-parsers:7588617316') {
|
||||||
exclude group: 'org.json', module: 'json'
|
exclude group: 'org.json', module: 'json'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ abstract class MangaListFragment :
|
|||||||
|
|
||||||
override fun onInflateView(
|
override fun onInflateView(
|
||||||
inflater: LayoutInflater,
|
inflater: LayoutInflater,
|
||||||
container: ViewGroup?
|
container: ViewGroup?,
|
||||||
) = FragmentListBinding.inflate(inflater, container, false)
|
) = FragmentListBinding.inflate(inflater, container, false)
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
@@ -76,13 +76,13 @@ abstract class MangaListFragment :
|
|||||||
listAdapter = MangaListAdapter(
|
listAdapter = MangaListAdapter(
|
||||||
coil = get(),
|
coil = get(),
|
||||||
lifecycleOwner = viewLifecycleOwner,
|
lifecycleOwner = viewLifecycleOwner,
|
||||||
listener = this,
|
listener = this
|
||||||
)
|
)
|
||||||
selectionController = ListSelectionController(
|
selectionController = ListSelectionController(
|
||||||
activity = requireActivity(),
|
activity = requireActivity(),
|
||||||
decoration = MangaSelectionDecoration(view.context),
|
decoration = MangaSelectionDecoration(view.context),
|
||||||
registryOwner = this,
|
registryOwner = this,
|
||||||
callback = this,
|
callback = this
|
||||||
)
|
)
|
||||||
paginationListener = PaginationScrollListener(4, this)
|
paginationListener = PaginationScrollListener(4, this)
|
||||||
with(binding.recyclerView) {
|
with(binding.recyclerView) {
|
||||||
@@ -97,7 +97,7 @@ abstract class MangaListFragment :
|
|||||||
setOnRefreshListener(this@MangaListFragment)
|
setOnRefreshListener(this@MangaListFragment)
|
||||||
isEnabled = isSwipeRefreshEnabled
|
isEnabled = isSwipeRefreshEnabled
|
||||||
}
|
}
|
||||||
addMenuProvider(MangaListMenuProvider(childFragmentManager))
|
addMenuProvider(MangaListMenuProvider(this))
|
||||||
|
|
||||||
viewModel.listMode.observe(viewLifecycleOwner, ::onListModeChanged)
|
viewModel.listMode.observe(viewLifecycleOwner, ::onListModeChanged)
|
||||||
viewModel.gridScale.observe(viewLifecycleOwner, ::onGridScaleChanged)
|
viewModel.gridScale.observe(viewLifecycleOwner, ::onGridScaleChanged)
|
||||||
@@ -171,21 +171,21 @@ abstract class MangaListFragment :
|
|||||||
val headerHeight = (activity as? AppBarOwner)?.appBar?.measureHeight() ?: insets.top
|
val headerHeight = (activity as? AppBarOwner)?.appBar?.measureHeight() ?: insets.top
|
||||||
binding.root.updatePadding(
|
binding.root.updatePadding(
|
||||||
left = insets.left,
|
left = insets.left,
|
||||||
right = insets.right,
|
right = insets.right
|
||||||
)
|
)
|
||||||
if (activity is MainActivity) {
|
if (activity is MainActivity) {
|
||||||
binding.recyclerView.updatePadding(
|
binding.recyclerView.updatePadding(
|
||||||
top = headerHeight,
|
top = headerHeight,
|
||||||
bottom = insets.bottom,
|
bottom = insets.bottom
|
||||||
)
|
)
|
||||||
binding.swipeRefreshLayout.setProgressViewOffset(
|
binding.swipeRefreshLayout.setProgressViewOffset(
|
||||||
true,
|
true,
|
||||||
headerHeight + resources.resolveDp(-72),
|
headerHeight + resources.resolveDp(-72),
|
||||||
headerHeight + resources.resolveDp(10),
|
headerHeight + resources.resolveDp(10)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
binding.recyclerView.updatePadding(
|
binding.recyclerView.updatePadding(
|
||||||
bottom = insets.bottom,
|
bottom = insets.bottom
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user