mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-15 01:35:07 +08:00
Fix dependencies and code issues
This commit is contained in:
parent
bd6b441b2a
commit
f5cb980020
@ -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',
|
||||
|
@ -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)
|
||||
|
@ -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 {
|
||||
|
@ -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,
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user