Fix dependencies and code issues

This commit is contained in:
Jorge Martín 2022-09-30 09:39:01 +02:00
parent bd6b441b2a
commit f5cb980020
10 changed files with 12 additions and 17 deletions

View File

@ -47,6 +47,7 @@ ext.groups = [
],
mavenCentral: [
regex: [
'com\\.google\\.auto\\.*',
],
group: [
'app.cash.paparazzi',
@ -101,6 +102,7 @@ ext.groups = [
'com.googlecode.json-simple',
'com.googlecode.libphonenumber',
'com.ibm.icu',
'com.intellij',
'com.jakewharton.android.repackaged',
'com.jakewharton.timber',
'com.kgurgul.flipper',

View File

@ -62,7 +62,7 @@ class JSonViewerFragment : Fragment(), MavericksView {
}
recyclerView = inflate.findViewById(R.id.jvRecyclerView)
recyclerView.layoutManager =
LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
recyclerView.setController(epoxyController)
epoxyController.setStyle(args?.styleProvider)
registerForContextMenu(recyclerView)

View File

@ -17,13 +17,6 @@ static def gitRevision() {
return cmd.execute().text.trim()
}
project.android.buildTypes.all { buildType ->
buildType.javaCompileOptions.annotationProcessorOptions.arguments =
[
validateEpoxyModelUsage: String.valueOf(buildType.name == 'debug')
]
}
initScreenshotTests(project)
android {

View File

@ -207,13 +207,13 @@ class AttachmentsPreviewFragment :
attachmentMiniaturePreviewController.callback = this
views.attachmentPreviewerMiniatureList.let {
it.layoutManager = LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false)
it.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
it.setHasFixedSize(true)
it.adapter = attachmentMiniaturePreviewController.adapter
}
views.attachmentPreviewerBigList.let {
it.layoutManager = LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false)
it.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
it.attachSnapHelperWithListener(
PagerSnapHelper(),
SnapOnScrollListener.Behavior.NOTIFY_ON_SCROLL_STATE_IDLE,

View File

@ -1434,8 +1434,8 @@ class TimelineFragment :
timelineEventController.timeline = timelineViewModel.timeline
views.timelineRecyclerView.trackItemsVisibilityChange()
layoutManager = object : LinearLayoutManager(context, RecyclerView.VERTICAL, true) {
override fun onLayoutCompleted(state: RecyclerView.State?) {
layoutManager = object : LinearLayoutManager(requireContext(), RecyclerView.VERTICAL, true) {
override fun onLayoutCompleted(state: RecyclerView.State) {
super.onLayoutCompleted(state)
updateJumpToReadMarkerViewVisibility()
jumpToBottomViewVisibilityManager.maybeShowJumpToBottomViewVisibilityWithDelay()

View File

@ -285,7 +285,7 @@ class RoomListFragment :
}
private fun setupRecyclerView() {
val layoutManager = LinearLayoutManager(context)
val layoutManager = LinearLayoutManager(requireContext())
stateRestorer = LayoutManagerStateRestorer(layoutManager).register()
views.roomListView.layoutManager = layoutManager
views.roomListView.itemAnimator = RoomListAnimator()

View File

@ -137,7 +137,7 @@ class HomeRoomListFragment :
private fun setupRecyclerView() {
views.stateView.state = StateView.State.Content
val layoutManager = LinearLayoutManager(context)
val layoutManager = LinearLayoutManager(requireContext())
firstItemObserver = FirstItemUpdatedObserver(layoutManager) {
layoutManager.scrollToPosition(0)
}

View File

@ -20,7 +20,7 @@ import android.content.Context
import android.os.Build
import androidx.annotation.MainThread
import androidx.annotation.VisibleForTesting
import androidx.annotation.VisibleForTesting.PRIVATE
import androidx.annotation.VisibleForTesting.Companion.PRIVATE
import androidx.biometric.BiometricManager
import androidx.biometric.BiometricManager.Authenticators.BIOMETRIC_STRONG
import androidx.biometric.BiometricManager.Authenticators.BIOMETRIC_WEAK

View File

@ -65,7 +65,7 @@ class VectorSettingsNotificationsTroubleshootFragment :
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
val layoutManager = LinearLayoutManager(context)
val layoutManager = LinearLayoutManager(requireContext())
views.troubleshootTestRecyclerView.layoutManager = layoutManager
val dividerItemDecoration = DividerItemDecoration(view.context, layoutManager.orientation)

View File

@ -214,7 +214,7 @@ class SpaceAddRoomFragment :
roomEpoxyController.submitList(it)
}
listenItemCount(viewModel.roomCountFlow) { roomEpoxyController.totalSize = it }
views.roomList.layoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
views.roomList.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
views.roomList.setHasFixedSize(true)
}