Merge pull request #7264 from vector-im/dependabot/gradle/epoxy-5.0.0
Bump epoxy from 4.6.2 to 5.0.0
This commit is contained in:
commit
6d2caf6210
30
build.gradle
30
build.gradle
|
@ -44,6 +44,8 @@ plugins {
|
||||||
id "org.jlleitschuh.gradle.ktlint" version "11.0.0"
|
id "org.jlleitschuh.gradle.ktlint" version "11.0.0"
|
||||||
// Detekt
|
// Detekt
|
||||||
id "io.gitlab.arturbosch.detekt" version "1.21.0"
|
id "io.gitlab.arturbosch.detekt" version "1.21.0"
|
||||||
|
// Ksp
|
||||||
|
id "com.google.devtools.ksp" version "1.7.20-1.0.6"
|
||||||
|
|
||||||
// Dependency Analysis
|
// Dependency Analysis
|
||||||
id 'com.autonomousapps.dependency-analysis' version "1.13.1"
|
id 'com.autonomousapps.dependency-analysis' version "1.13.1"
|
||||||
|
@ -327,3 +329,31 @@ ext.initScreenshotTests = { project ->
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Workaround to have KSP generated Kotlin code available in the IDE (for code completion)
|
||||||
|
// Ref: https://github.com/airbnb/epoxy/releases/tag/5.0.0beta02
|
||||||
|
subprojects { project ->
|
||||||
|
afterEvaluate {
|
||||||
|
if (project.hasProperty("android")) {
|
||||||
|
android {
|
||||||
|
if (it instanceof com.android.build.gradle.LibraryExtension) {
|
||||||
|
libraryVariants.all { variant ->
|
||||||
|
def outputFolder = new File("build/generated/ksp/${variant.name}/kotlin")
|
||||||
|
variant.addJavaSourceFoldersToModel(outputFolder)
|
||||||
|
android.sourceSets.getAt(variant.name).java {
|
||||||
|
srcDir(outputFolder)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (it instanceof com.android.build.gradle.AppExtension) {
|
||||||
|
applicationVariants.all { variant ->
|
||||||
|
def outputFolder = new File("build/generated/ksp/${variant.name}/kotlin")
|
||||||
|
variant.addJavaSourceFoldersToModel(outputFolder)
|
||||||
|
android.sourceSets.getAt(variant.name).java {
|
||||||
|
srcDir(outputFolder)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ def moshi = "1.14.0"
|
||||||
def lifecycle = "2.5.1"
|
def lifecycle = "2.5.1"
|
||||||
def flowBinding = "1.2.0"
|
def flowBinding = "1.2.0"
|
||||||
def flipper = "0.164.0"
|
def flipper = "0.164.0"
|
||||||
def epoxy = "4.6.2"
|
def epoxy = "5.0.0"
|
||||||
def mavericks = "3.0.1"
|
def mavericks = "3.0.1"
|
||||||
def glide = "4.14.1"
|
def glide = "4.14.1"
|
||||||
def bigImageViewer = "1.8.1"
|
def bigImageViewer = "1.8.1"
|
||||||
|
|
|
@ -84,6 +84,7 @@ ext.groups = [
|
||||||
'com.google',
|
'com.google',
|
||||||
'com.google.android',
|
'com.google.android',
|
||||||
'com.google.api.grpc',
|
'com.google.api.grpc',
|
||||||
|
'com.google.auto',
|
||||||
'com.google.auto.service',
|
'com.google.auto.service',
|
||||||
'com.google.auto.value',
|
'com.google.auto.value',
|
||||||
'com.google.code.findbugs',
|
'com.google.code.findbugs',
|
||||||
|
@ -101,6 +102,7 @@ ext.groups = [
|
||||||
'com.googlecode.json-simple',
|
'com.googlecode.json-simple',
|
||||||
'com.googlecode.libphonenumber',
|
'com.googlecode.libphonenumber',
|
||||||
'com.ibm.icu',
|
'com.ibm.icu',
|
||||||
|
'com.intellij',
|
||||||
'com.jakewharton.android.repackaged',
|
'com.jakewharton.android.repackaged',
|
||||||
'com.jakewharton.timber',
|
'com.jakewharton.timber',
|
||||||
'com.kgurgul.flipper',
|
'com.kgurgul.flipper',
|
||||||
|
|
|
@ -2,6 +2,7 @@ apply plugin: 'com.android.library'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-parcelize'
|
apply plugin: 'kotlin-parcelize'
|
||||||
apply plugin: 'kotlin-kapt'
|
apply plugin: 'kotlin-kapt'
|
||||||
|
apply plugin: 'com.google.devtools.ksp'
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -51,7 +52,7 @@ dependencies {
|
||||||
implementation libs.androidx.recyclerview
|
implementation libs.androidx.recyclerview
|
||||||
|
|
||||||
implementation libs.airbnb.epoxy
|
implementation libs.airbnb.epoxy
|
||||||
kapt libs.airbnb.epoxyProcessor
|
ksp libs.airbnb.epoxyProcessor
|
||||||
|
|
||||||
implementation libs.airbnb.mavericks
|
implementation libs.airbnb.mavericks
|
||||||
// Span utils
|
// Span utils
|
||||||
|
|
|
@ -62,7 +62,7 @@ class JSonViewerFragment : Fragment(), MavericksView {
|
||||||
}
|
}
|
||||||
recyclerView = inflate.findViewById(R.id.jvRecyclerView)
|
recyclerView = inflate.findViewById(R.id.jvRecyclerView)
|
||||||
recyclerView.layoutManager =
|
recyclerView.layoutManager =
|
||||||
LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
|
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||||
recyclerView.setController(epoxyController)
|
recyclerView.setController(epoxyController)
|
||||||
epoxyController.setStyle(args?.styleProvider)
|
epoxyController.setStyle(args?.styleProvider)
|
||||||
registerForContextMenu(recyclerView)
|
registerForContextMenu(recyclerView)
|
||||||
|
|
|
@ -6,6 +6,7 @@ apply plugin: 'com.google.android.gms.oss-licenses-plugin'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-parcelize'
|
apply plugin: 'kotlin-parcelize'
|
||||||
apply plugin: 'kotlin-kapt'
|
apply plugin: 'kotlin-kapt'
|
||||||
|
apply plugin: 'com.google.devtools.ksp'
|
||||||
apply plugin: 'dagger.hilt.android.plugin'
|
apply plugin: 'dagger.hilt.android.plugin'
|
||||||
apply plugin: 'kotlinx-knit'
|
apply plugin: 'kotlinx-knit'
|
||||||
apply plugin: 'com.likethesalad.stem'
|
apply plugin: 'com.likethesalad.stem'
|
||||||
|
@ -387,7 +388,7 @@ dependencies {
|
||||||
// OSS License, gplay flavor only
|
// OSS License, gplay flavor only
|
||||||
gplayImplementation 'com.google.android.gms:play-services-oss-licenses:17.0.0'
|
gplayImplementation 'com.google.android.gms:play-services-oss-licenses:17.0.0'
|
||||||
kapt libs.dagger.hiltCompiler
|
kapt libs.dagger.hiltCompiler
|
||||||
kapt libs.airbnb.epoxyProcessor
|
ksp libs.airbnb.epoxyProcessor
|
||||||
|
|
||||||
androidTestImplementation libs.androidx.testCore
|
androidTestImplementation libs.androidx.testCore
|
||||||
androidTestImplementation libs.androidx.testRunner
|
androidTestImplementation libs.androidx.testRunner
|
||||||
|
|
|
@ -2,6 +2,7 @@ apply plugin: 'com.android.library'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-parcelize'
|
apply plugin: 'kotlin-parcelize'
|
||||||
apply plugin: 'kotlin-kapt'
|
apply plugin: 'kotlin-kapt'
|
||||||
|
apply plugin: 'com.google.devtools.ksp'
|
||||||
apply plugin: 'dagger.hilt.android.plugin'
|
apply plugin: 'dagger.hilt.android.plugin'
|
||||||
|
|
||||||
if (project.hasProperty("coverage")) {
|
if (project.hasProperty("coverage")) {
|
||||||
|
@ -156,7 +157,7 @@ dependencies {
|
||||||
|
|
||||||
api libs.airbnb.epoxy
|
api libs.airbnb.epoxy
|
||||||
implementation libs.airbnb.epoxyGlide
|
implementation libs.airbnb.epoxyGlide
|
||||||
kapt libs.airbnb.epoxyProcessor
|
ksp libs.airbnb.epoxyProcessor
|
||||||
implementation libs.airbnb.epoxyPaging
|
implementation libs.airbnb.epoxyPaging
|
||||||
api libs.airbnb.mavericks
|
api libs.airbnb.mavericks
|
||||||
|
|
||||||
|
|
|
@ -207,13 +207,13 @@ class AttachmentsPreviewFragment :
|
||||||
attachmentMiniaturePreviewController.callback = this
|
attachmentMiniaturePreviewController.callback = this
|
||||||
|
|
||||||
views.attachmentPreviewerMiniatureList.let {
|
views.attachmentPreviewerMiniatureList.let {
|
||||||
it.layoutManager = LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false)
|
it.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||||
it.setHasFixedSize(true)
|
it.setHasFixedSize(true)
|
||||||
it.adapter = attachmentMiniaturePreviewController.adapter
|
it.adapter = attachmentMiniaturePreviewController.adapter
|
||||||
}
|
}
|
||||||
|
|
||||||
views.attachmentPreviewerBigList.let {
|
views.attachmentPreviewerBigList.let {
|
||||||
it.layoutManager = LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false)
|
it.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||||
it.attachSnapHelperWithListener(
|
it.attachSnapHelperWithListener(
|
||||||
PagerSnapHelper(),
|
PagerSnapHelper(),
|
||||||
SnapOnScrollListener.Behavior.NOTIFY_ON_SCROLL_STATE_IDLE,
|
SnapOnScrollListener.Behavior.NOTIFY_ON_SCROLL_STATE_IDLE,
|
||||||
|
|
|
@ -1436,8 +1436,8 @@ class TimelineFragment :
|
||||||
timelineEventController.timeline = timelineViewModel.timeline
|
timelineEventController.timeline = timelineViewModel.timeline
|
||||||
|
|
||||||
views.timelineRecyclerView.trackItemsVisibilityChange()
|
views.timelineRecyclerView.trackItemsVisibilityChange()
|
||||||
layoutManager = object : LinearLayoutManager(context, RecyclerView.VERTICAL, true) {
|
layoutManager = object : LinearLayoutManager(requireContext(), RecyclerView.VERTICAL, true) {
|
||||||
override fun onLayoutCompleted(state: RecyclerView.State?) {
|
override fun onLayoutCompleted(state: RecyclerView.State) {
|
||||||
super.onLayoutCompleted(state)
|
super.onLayoutCompleted(state)
|
||||||
updateJumpToReadMarkerViewVisibility()
|
updateJumpToReadMarkerViewVisibility()
|
||||||
jumpToBottomViewVisibilityManager.maybeShowJumpToBottomViewVisibilityWithDelay()
|
jumpToBottomViewVisibilityManager.maybeShowJumpToBottomViewVisibilityWithDelay()
|
||||||
|
|
|
@ -245,7 +245,7 @@ class MessageItemFactory @Inject constructor(
|
||||||
.pollQuestion(createPollQuestion(informationData, pollViewState.question, callback))
|
.pollQuestion(createPollQuestion(informationData, pollViewState.question, callback))
|
||||||
.canVote(pollViewState.canVote)
|
.canVote(pollViewState.canVote)
|
||||||
.votesStatus(pollViewState.votesStatus)
|
.votesStatus(pollViewState.votesStatus)
|
||||||
.optionViewStates(pollViewState.optionViewStates)
|
.optionViewStates(pollViewState.optionViewStates.orEmpty())
|
||||||
.edited(informationData.hasBeenEdited)
|
.edited(informationData.hasBeenEdited)
|
||||||
.highlighted(highlight)
|
.highlighted(highlight)
|
||||||
.leftGuideline(avatarSizeProvider.leftGuideline)
|
.leftGuideline(avatarSizeProvider.leftGuideline)
|
||||||
|
@ -279,7 +279,7 @@ class MessageItemFactory @Inject constructor(
|
||||||
.duration(messageContent.audioInfo?.duration ?: 0)
|
.duration(messageContent.audioInfo?.duration ?: 0)
|
||||||
.playbackControlButtonClickListener(playbackControlButtonClickListener)
|
.playbackControlButtonClickListener(playbackControlButtonClickListener)
|
||||||
.audioMessagePlaybackTracker(audioMessagePlaybackTracker)
|
.audioMessagePlaybackTracker(audioMessagePlaybackTracker)
|
||||||
.isLocalFile(localFilesHelper.isLocalFile(fileUrl))
|
.izLocalFile(localFilesHelper.isLocalFile(fileUrl))
|
||||||
.fileSize(messageContent.audioInfo?.size ?: 0L)
|
.fileSize(messageContent.audioInfo?.size ?: 0L)
|
||||||
.onSeek { params.callback?.onAudioSeekBarMovedTo(informationData.eventId, duration, it) }
|
.onSeek { params.callback?.onAudioSeekBarMovedTo(informationData.eventId, duration, it) }
|
||||||
.mxcUrl(fileUrl)
|
.mxcUrl(fileUrl)
|
||||||
|
@ -339,7 +339,7 @@ class MessageItemFactory @Inject constructor(
|
||||||
.playbackControlButtonClickListener(playbackControlButtonClickListener)
|
.playbackControlButtonClickListener(playbackControlButtonClickListener)
|
||||||
.waveformTouchListener(waveformTouchListener)
|
.waveformTouchListener(waveformTouchListener)
|
||||||
.audioMessagePlaybackTracker(audioMessagePlaybackTracker)
|
.audioMessagePlaybackTracker(audioMessagePlaybackTracker)
|
||||||
.isLocalFile(localFilesHelper.isLocalFile(fileUrl))
|
.izLocalFile(localFilesHelper.isLocalFile(fileUrl))
|
||||||
.mxcUrl(fileUrl)
|
.mxcUrl(fileUrl)
|
||||||
.contentUploadStateTrackerBinder(contentUploadStateTrackerBinder)
|
.contentUploadStateTrackerBinder(contentUploadStateTrackerBinder)
|
||||||
.contentDownloadStateTrackerBinder(contentDownloadStateTrackerBinder)
|
.contentDownloadStateTrackerBinder(contentDownloadStateTrackerBinder)
|
||||||
|
@ -399,8 +399,8 @@ class MessageItemFactory @Inject constructor(
|
||||||
return MessageFileItem_()
|
return MessageFileItem_()
|
||||||
.attributes(attributes)
|
.attributes(attributes)
|
||||||
.leftGuideline(avatarSizeProvider.leftGuideline)
|
.leftGuideline(avatarSizeProvider.leftGuideline)
|
||||||
.isLocalFile(localFilesHelper.isLocalFile(messageContent.getFileUrl()))
|
.izLocalFile(localFilesHelper.isLocalFile(messageContent.getFileUrl()))
|
||||||
.isDownloaded(session.fileService().isFileInCache(messageContent))
|
.izDownloaded(session.fileService().isFileInCache(messageContent))
|
||||||
.mxcUrl(mxcUrl)
|
.mxcUrl(mxcUrl)
|
||||||
.contentUploadStateTrackerBinder(contentUploadStateTrackerBinder)
|
.contentUploadStateTrackerBinder(contentUploadStateTrackerBinder)
|
||||||
.contentDownloadStateTrackerBinder(contentDownloadStateTrackerBinder)
|
.contentDownloadStateTrackerBinder(contentDownloadStateTrackerBinder)
|
||||||
|
|
|
@ -53,8 +53,7 @@ abstract class MessageAudioItem : AbsMessageItem<MessageAudioItem.Holder>() {
|
||||||
var fileSize: Long = 0
|
var fileSize: Long = 0
|
||||||
|
|
||||||
@EpoxyAttribute
|
@EpoxyAttribute
|
||||||
@JvmField
|
var izLocalFile = false
|
||||||
var isLocalFile = false
|
|
||||||
|
|
||||||
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
|
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
|
||||||
var onSeek: ((percentage: Float) -> Unit)? = null
|
var onSeek: ((percentage: Float) -> Unit)? = null
|
||||||
|
@ -91,7 +90,7 @@ abstract class MessageAudioItem : AbsMessageItem<MessageAudioItem.Holder>() {
|
||||||
holder.view.context.getString(R.string.error_audio_message_unable_to_play, filename)
|
holder.view.context.getString(R.string.error_audio_message_unable_to_play, filename)
|
||||||
holder.progressLayout.isVisible = false
|
holder.progressLayout.isVisible = false
|
||||||
} else {
|
} else {
|
||||||
contentUploadStateTrackerBinder.bind(attributes.informationData.eventId, isLocalFile, holder.progressLayout)
|
contentUploadStateTrackerBinder.bind(attributes.informationData.eventId, izLocalFile, holder.progressLayout)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,12 +48,10 @@ abstract class MessageFileItem : AbsMessageItem<MessageFileItem.Holder>() {
|
||||||
var iconRes: Int = 0
|
var iconRes: Int = 0
|
||||||
|
|
||||||
@EpoxyAttribute
|
@EpoxyAttribute
|
||||||
@JvmField
|
var izLocalFile = false
|
||||||
var isLocalFile = false
|
|
||||||
|
|
||||||
@EpoxyAttribute
|
@EpoxyAttribute
|
||||||
@JvmField
|
var izDownloaded = false
|
||||||
var isDownloaded = false
|
|
||||||
|
|
||||||
@EpoxyAttribute
|
@EpoxyAttribute
|
||||||
lateinit var contentUploadStateTrackerBinder: ContentUploadStateTrackerBinder
|
lateinit var contentUploadStateTrackerBinder: ContentUploadStateTrackerBinder
|
||||||
|
@ -66,7 +64,7 @@ abstract class MessageFileItem : AbsMessageItem<MessageFileItem.Holder>() {
|
||||||
renderSendState(holder.fileLayout, holder.filenameView)
|
renderSendState(holder.fileLayout, holder.filenameView)
|
||||||
|
|
||||||
if (!attributes.informationData.sendState.hasFailed()) {
|
if (!attributes.informationData.sendState.hasFailed()) {
|
||||||
contentUploadStateTrackerBinder.bind(attributes.informationData.eventId, isLocalFile, holder.progressLayout)
|
contentUploadStateTrackerBinder.bind(attributes.informationData.eventId, izLocalFile, holder.progressLayout)
|
||||||
} else {
|
} else {
|
||||||
holder.fileImageView.setImageResource(R.drawable.ic_cross)
|
holder.fileImageView.setImageResource(R.drawable.ic_cross)
|
||||||
holder.progressLayout.isVisible = false
|
holder.progressLayout.isVisible = false
|
||||||
|
@ -77,7 +75,7 @@ abstract class MessageFileItem : AbsMessageItem<MessageFileItem.Holder>() {
|
||||||
if (attributes.informationData.sendState.isSending()) {
|
if (attributes.informationData.sendState.isSending()) {
|
||||||
holder.fileImageView.setImageResource(iconRes)
|
holder.fileImageView.setImageResource(iconRes)
|
||||||
} else {
|
} else {
|
||||||
if (isDownloaded) {
|
if (izDownloaded) {
|
||||||
holder.fileImageView.setImageResource(iconRes)
|
holder.fileImageView.setImageResource(iconRes)
|
||||||
holder.fileDownloadProgress.progress = 0
|
holder.fileDownloadProgress.progress = 0
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -55,8 +55,7 @@ abstract class MessageVoiceItem : AbsMessageItem<MessageVoiceItem.Holder>() {
|
||||||
var waveform: List<Int> = emptyList()
|
var waveform: List<Int> = emptyList()
|
||||||
|
|
||||||
@EpoxyAttribute
|
@EpoxyAttribute
|
||||||
@JvmField
|
var izLocalFile = false
|
||||||
var isLocalFile = false
|
|
||||||
|
|
||||||
@EpoxyAttribute
|
@EpoxyAttribute
|
||||||
lateinit var contentUploadStateTrackerBinder: ContentUploadStateTrackerBinder
|
lateinit var contentUploadStateTrackerBinder: ContentUploadStateTrackerBinder
|
||||||
|
@ -77,7 +76,7 @@ abstract class MessageVoiceItem : AbsMessageItem<MessageVoiceItem.Holder>() {
|
||||||
super.bind(holder)
|
super.bind(holder)
|
||||||
renderSendState(holder.voiceLayout, null)
|
renderSendState(holder.voiceLayout, null)
|
||||||
if (!attributes.informationData.sendState.hasFailed()) {
|
if (!attributes.informationData.sendState.hasFailed()) {
|
||||||
contentUploadStateTrackerBinder.bind(attributes.informationData.eventId, isLocalFile, holder.progressLayout)
|
contentUploadStateTrackerBinder.bind(attributes.informationData.eventId, izLocalFile, holder.progressLayout)
|
||||||
} else {
|
} else {
|
||||||
holder.voicePlaybackControlButton.setImageResource(R.drawable.ic_cross)
|
holder.voicePlaybackControlButton.setImageResource(R.drawable.ic_cross)
|
||||||
holder.voicePlaybackControlButton.contentDescription = holder.view.context.getString(R.string.error_voice_message_unable_to_play)
|
holder.voicePlaybackControlButton.contentDescription = holder.view.context.getString(R.string.error_voice_message_unable_to_play)
|
||||||
|
|
|
@ -285,7 +285,7 @@ class RoomListFragment :
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupRecyclerView() {
|
private fun setupRecyclerView() {
|
||||||
val layoutManager = LinearLayoutManager(context)
|
val layoutManager = LinearLayoutManager(requireContext())
|
||||||
stateRestorer = LayoutManagerStateRestorer(layoutManager).register()
|
stateRestorer = LayoutManagerStateRestorer(layoutManager).register()
|
||||||
views.roomListView.layoutManager = layoutManager
|
views.roomListView.layoutManager = layoutManager
|
||||||
views.roomListView.itemAnimator = RoomListAnimator()
|
views.roomListView.itemAnimator = RoomListAnimator()
|
||||||
|
|
|
@ -41,7 +41,7 @@ import org.matrix.android.sdk.api.session.presence.model.UserPresence
|
||||||
import org.matrix.android.sdk.api.util.MatrixItem
|
import org.matrix.android.sdk.api.util.MatrixItem
|
||||||
|
|
||||||
@EpoxyModelClass
|
@EpoxyModelClass
|
||||||
abstract class RoomSummaryItemCentered : VectorEpoxyModel<RoomSummaryItemCentered.Holder>(R.layout.item_room_centered) {
|
abstract class RoomSummaryCenteredItem : VectorEpoxyModel<RoomSummaryCenteredItem.Holder>(R.layout.item_room_centered) {
|
||||||
|
|
||||||
@EpoxyAttribute
|
@EpoxyAttribute
|
||||||
lateinit var avatarRenderer: AvatarRenderer
|
lateinit var avatarRenderer: AvatarRenderer
|
||||||
|
@ -61,8 +61,8 @@ abstract class RoomSummaryItemCentered : VectorEpoxyModel<RoomSummaryItemCentere
|
||||||
@EpoxyAttribute
|
@EpoxyAttribute
|
||||||
var showPresence: Boolean = false
|
var showPresence: Boolean = false
|
||||||
|
|
||||||
@EpoxyAttribute @JvmField
|
@EpoxyAttribute
|
||||||
var isPublic: Boolean = false
|
var izPublic: Boolean = false
|
||||||
|
|
||||||
@EpoxyAttribute
|
@EpoxyAttribute
|
||||||
var unreadNotificationCount: Int = 0
|
var unreadNotificationCount: Int = 0
|
||||||
|
@ -96,7 +96,7 @@ abstract class RoomSummaryItemCentered : VectorEpoxyModel<RoomSummaryItemCentere
|
||||||
holder.titleView.text = matrixItem.getBestName()
|
holder.titleView.text = matrixItem.getBestName()
|
||||||
avatarRenderer.render(matrixItem, holder.avatarImageView)
|
avatarRenderer.render(matrixItem, holder.avatarImageView)
|
||||||
holder.roomAvatarDecorationImageView.render(encryptionTrustLevel)
|
holder.roomAvatarDecorationImageView.render(encryptionTrustLevel)
|
||||||
holder.roomAvatarPublicDecorationImageView.isVisible = isPublic
|
holder.roomAvatarPublicDecorationImageView.isVisible = izPublic
|
||||||
holder.roomAvatarFailSendingImageView.isVisible = hasFailedSending
|
holder.roomAvatarFailSendingImageView.isVisible = hasFailedSending
|
||||||
renderSelection(holder, showSelected)
|
renderSelection(holder, showSelected)
|
||||||
holder.roomAvatarPresenceImageView.render(showPresence, userPresence)
|
holder.roomAvatarPresenceImageView.render(showPresence, userPresence)
|
|
@ -76,8 +76,8 @@ abstract class RoomSummaryItem : VectorEpoxyModel<RoomSummaryItem.Holder>(R.layo
|
||||||
@EpoxyAttribute
|
@EpoxyAttribute
|
||||||
var showPresence: Boolean = false
|
var showPresence: Boolean = false
|
||||||
|
|
||||||
@EpoxyAttribute @JvmField
|
@EpoxyAttribute
|
||||||
var isPublic: Boolean = false
|
var izPublic: Boolean = false
|
||||||
|
|
||||||
@EpoxyAttribute
|
@EpoxyAttribute
|
||||||
var unreadNotificationCount: Int = 0
|
var unreadNotificationCount: Int = 0
|
||||||
|
@ -121,7 +121,7 @@ abstract class RoomSummaryItem : VectorEpoxyModel<RoomSummaryItem.Holder>(R.layo
|
||||||
holder.draftView.isVisible = hasDraft
|
holder.draftView.isVisible = hasDraft
|
||||||
avatarRenderer.render(matrixItem, holder.avatarImageView)
|
avatarRenderer.render(matrixItem, holder.avatarImageView)
|
||||||
holder.roomAvatarDecorationImageView.render(encryptionTrustLevel)
|
holder.roomAvatarDecorationImageView.render(encryptionTrustLevel)
|
||||||
holder.roomAvatarPublicDecorationImageView.isVisible = isPublic
|
holder.roomAvatarPublicDecorationImageView.isVisible = izPublic
|
||||||
holder.roomAvatarFailSendingImageView.isVisible = hasFailedSending
|
holder.roomAvatarFailSendingImageView.isVisible = hasFailedSending
|
||||||
renderSelection(holder, showSelected)
|
renderSelection(holder, showSelected)
|
||||||
holder.roomAvatarPresenceImageView.render(showPresence, userPresence)
|
holder.roomAvatarPresenceImageView.render(showPresence, userPresence)
|
||||||
|
|
|
@ -167,7 +167,7 @@ class RoomSummaryItemFactory @Inject constructor(
|
||||||
// .encryptionTrustLevel(roomSummary.roomEncryptionTrustLevel)
|
// .encryptionTrustLevel(roomSummary.roomEncryptionTrustLevel)
|
||||||
.displayMode(displayMode)
|
.displayMode(displayMode)
|
||||||
.subtitle(subtitle)
|
.subtitle(subtitle)
|
||||||
.isPublic(roomSummary.isPublic)
|
.izPublic(roomSummary.isPublic)
|
||||||
.showPresence(roomSummary.isDirect)
|
.showPresence(roomSummary.isDirect)
|
||||||
.userPresence(roomSummary.directUserPresence)
|
.userPresence(roomSummary.directUserPresence)
|
||||||
.matrixItem(roomSummary.toMatrixItem())
|
.matrixItem(roomSummary.toMatrixItem())
|
||||||
|
@ -191,13 +191,13 @@ class RoomSummaryItemFactory @Inject constructor(
|
||||||
unreadCount: Int,
|
unreadCount: Int,
|
||||||
onClick: ((RoomSummary) -> Unit)?,
|
onClick: ((RoomSummary) -> Unit)?,
|
||||||
onLongClick: ((RoomSummary) -> Boolean)?
|
onLongClick: ((RoomSummary) -> Boolean)?
|
||||||
) = RoomSummaryItemCentered_()
|
) = RoomSummaryCenteredItem_()
|
||||||
.id(roomSummary.roomId)
|
.id(roomSummary.roomId)
|
||||||
.avatarRenderer(avatarRenderer)
|
.avatarRenderer(avatarRenderer)
|
||||||
// We do not display shield in the room list anymore
|
// We do not display shield in the room list anymore
|
||||||
// .encryptionTrustLevel(roomSummary.roomEncryptionTrustLevel)
|
// .encryptionTrustLevel(roomSummary.roomEncryptionTrustLevel)
|
||||||
.displayMode(displayMode)
|
.displayMode(displayMode)
|
||||||
.isPublic(roomSummary.isPublic)
|
.izPublic(roomSummary.isPublic)
|
||||||
.showPresence(roomSummary.isDirect)
|
.showPresence(roomSummary.isDirect)
|
||||||
.userPresence(roomSummary.directUserPresence)
|
.userPresence(roomSummary.directUserPresence)
|
||||||
.matrixItem(roomSummary.toMatrixItem())
|
.matrixItem(roomSummary.toMatrixItem())
|
||||||
|
|
|
@ -67,7 +67,7 @@ class RoomSummaryPagedController(
|
||||||
override fun buildItemModel(currentPosition: Int, item: RoomSummary?): EpoxyModel<*> {
|
override fun buildItemModel(currentPosition: Int, item: RoomSummary?): EpoxyModel<*> {
|
||||||
return if (item == null) {
|
return if (item == null) {
|
||||||
val host = this
|
val host = this
|
||||||
RoomSummaryItemPlaceHolder_().apply {
|
RoomSummaryPlaceHolderItem_().apply {
|
||||||
id(currentPosition)
|
id(currentPosition)
|
||||||
useSingleLineForLastEvent(host.shouldUseSingleLine)
|
useSingleLineForLastEvent(host.shouldUseSingleLine)
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder
|
||||||
import im.vector.app.core.epoxy.VectorEpoxyModel
|
import im.vector.app.core.epoxy.VectorEpoxyModel
|
||||||
|
|
||||||
@EpoxyModelClass
|
@EpoxyModelClass
|
||||||
abstract class RoomSummaryItemPlaceHolder : VectorEpoxyModel<RoomSummaryItemPlaceHolder.Holder>(R.layout.item_room_placeholder) {
|
abstract class RoomSummaryPlaceHolderItem : VectorEpoxyModel<RoomSummaryPlaceHolderItem.Holder>(R.layout.item_room_placeholder) {
|
||||||
|
|
||||||
@EpoxyAttribute
|
@EpoxyAttribute
|
||||||
var useSingleLineForLastEvent: Boolean = false
|
var useSingleLineForLastEvent: Boolean = false
|
|
@ -22,6 +22,6 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder
|
||||||
import im.vector.app.core.epoxy.VectorEpoxyModel
|
import im.vector.app.core.epoxy.VectorEpoxyModel
|
||||||
|
|
||||||
@EpoxyModelClass
|
@EpoxyModelClass
|
||||||
abstract class SpaceDirectoryFilterNoResults : VectorEpoxyModel<SpaceDirectoryFilterNoResults.Holder>(R.layout.item_space_directory_filter_no_results) {
|
abstract class SpaceDirectoryFilterNoResultsItem : VectorEpoxyModel<SpaceDirectoryFilterNoResultsItem.Holder>(R.layout.item_space_directory_filter_no_results) {
|
||||||
class Holder : VectorEpoxyHolder()
|
class Holder : VectorEpoxyHolder()
|
||||||
}
|
}
|
|
@ -24,7 +24,7 @@ import im.vector.app.core.utils.createUIHandler
|
||||||
import im.vector.app.features.home.RoomListDisplayMode
|
import im.vector.app.features.home.RoomListDisplayMode
|
||||||
import im.vector.app.features.home.room.list.RoomListListener
|
import im.vector.app.features.home.room.list.RoomListListener
|
||||||
import im.vector.app.features.home.room.list.RoomSummaryItemFactory
|
import im.vector.app.features.home.room.list.RoomSummaryItemFactory
|
||||||
import im.vector.app.features.home.room.list.RoomSummaryItemPlaceHolder_
|
import im.vector.app.features.home.room.list.RoomSummaryPlaceHolderItem_
|
||||||
import im.vector.app.features.settings.FontScalePreferences
|
import im.vector.app.features.settings.FontScalePreferences
|
||||||
import org.matrix.android.sdk.api.session.room.members.ChangeMembershipState
|
import org.matrix.android.sdk.api.session.room.members.ChangeMembershipState
|
||||||
import org.matrix.android.sdk.api.session.room.model.RoomSummary
|
import org.matrix.android.sdk.api.session.room.model.RoomSummary
|
||||||
|
@ -83,7 +83,7 @@ class HomeFilteredRoomsController @Inject constructor(
|
||||||
override fun buildItemModel(currentPosition: Int, item: RoomSummary?): EpoxyModel<*> {
|
override fun buildItemModel(currentPosition: Int, item: RoomSummary?): EpoxyModel<*> {
|
||||||
return if (item == null) {
|
return if (item == null) {
|
||||||
val host = this
|
val host = this
|
||||||
RoomSummaryItemPlaceHolder_().apply {
|
RoomSummaryPlaceHolderItem_().apply {
|
||||||
id(currentPosition)
|
id(currentPosition)
|
||||||
useSingleLineForLastEvent(host.shouldUseSingleLine)
|
useSingleLineForLastEvent(host.shouldUseSingleLine)
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,7 @@ class HomeRoomListFragment :
|
||||||
|
|
||||||
private fun setupRecyclerView() {
|
private fun setupRecyclerView() {
|
||||||
views.stateView.state = StateView.State.Content
|
views.stateView.state = StateView.State.Content
|
||||||
val layoutManager = LinearLayoutManager(context)
|
val layoutManager = LinearLayoutManager(requireContext())
|
||||||
firstItemObserver = FirstItemUpdatedObserver(layoutManager) {
|
firstItemObserver = FirstItemUpdatedObserver(layoutManager) {
|
||||||
layoutManager.scrollToPosition(0)
|
layoutManager.scrollToPosition(0)
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ import im.vector.app.core.utils.createUIHandler
|
||||||
import im.vector.app.features.home.RoomListDisplayMode
|
import im.vector.app.features.home.RoomListDisplayMode
|
||||||
import im.vector.app.features.home.room.list.RoomListListener
|
import im.vector.app.features.home.room.list.RoomListListener
|
||||||
import im.vector.app.features.home.room.list.RoomSummaryItemFactory
|
import im.vector.app.features.home.room.list.RoomSummaryItemFactory
|
||||||
import im.vector.app.features.home.room.list.RoomSummaryItemPlaceHolder_
|
import im.vector.app.features.home.room.list.RoomSummaryPlaceHolderItem_
|
||||||
import org.matrix.android.sdk.api.session.room.members.ChangeMembershipState
|
import org.matrix.android.sdk.api.session.room.members.ChangeMembershipState
|
||||||
import org.matrix.android.sdk.api.session.room.model.RoomSummary
|
import org.matrix.android.sdk.api.session.room.model.RoomSummary
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
@ -43,7 +43,7 @@ class InvitesController @Inject constructor(
|
||||||
var listener: RoomListListener? = null
|
var listener: RoomListListener? = null
|
||||||
|
|
||||||
override fun buildItemModel(currentPosition: Int, item: RoomSummary?): EpoxyModel<*> {
|
override fun buildItemModel(currentPosition: Int, item: RoomSummary?): EpoxyModel<*> {
|
||||||
item ?: return RoomSummaryItemPlaceHolder_().apply { id(currentPosition) }
|
item ?: return RoomSummaryPlaceHolderItem_().apply { id(currentPosition) }
|
||||||
return roomSummaryItemFactory.create(item, roomChangeMembershipStates.orEmpty(), emptySet(), RoomListDisplayMode.ROOMS, listener)
|
return roomSummaryItemFactory.create(item, roomChangeMembershipStates.orEmpty(), emptySet(), RoomListDisplayMode.ROOMS, listener)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ import android.content.Context
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import androidx.annotation.MainThread
|
import androidx.annotation.MainThread
|
||||||
import androidx.annotation.VisibleForTesting
|
import androidx.annotation.VisibleForTesting
|
||||||
import androidx.annotation.VisibleForTesting.PRIVATE
|
import androidx.annotation.VisibleForTesting.Companion.PRIVATE
|
||||||
import androidx.biometric.BiometricManager
|
import androidx.biometric.BiometricManager
|
||||||
import androidx.biometric.BiometricManager.Authenticators.BIOMETRIC_STRONG
|
import androidx.biometric.BiometricManager.Authenticators.BIOMETRIC_STRONG
|
||||||
import androidx.biometric.BiometricManager.Authenticators.BIOMETRIC_WEAK
|
import androidx.biometric.BiometricManager.Authenticators.BIOMETRIC_WEAK
|
||||||
|
|
|
@ -65,7 +65,7 @@ class VectorSettingsNotificationsTroubleshootFragment :
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
val layoutManager = LinearLayoutManager(context)
|
val layoutManager = LinearLayoutManager(requireContext())
|
||||||
views.troubleshootTestRecyclerView.layoutManager = layoutManager
|
views.troubleshootTestRecyclerView.layoutManager = layoutManager
|
||||||
|
|
||||||
val dividerItemDecoration = DividerItemDecoration(view.context, layoutManager.orientation)
|
val dividerItemDecoration = DividerItemDecoration(view.context, layoutManager.orientation)
|
||||||
|
|
|
@ -34,7 +34,7 @@ import im.vector.app.core.ui.list.genericEmptyWithActionItem
|
||||||
import im.vector.app.core.ui.list.genericPillItem
|
import im.vector.app.core.ui.list.genericPillItem
|
||||||
import im.vector.app.features.home.AvatarRenderer
|
import im.vector.app.features.home.AvatarRenderer
|
||||||
import im.vector.app.features.home.room.list.spaceChildInfoItem
|
import im.vector.app.features.home.room.list.spaceChildInfoItem
|
||||||
import im.vector.app.features.home.room.list.spaceDirectoryFilterNoResults
|
import im.vector.app.features.home.room.list.spaceDirectoryFilterNoResultsItem
|
||||||
import im.vector.app.features.spaces.manage.SpaceChildInfoMatchFilter
|
import im.vector.app.features.spaces.manage.SpaceChildInfoMatchFilter
|
||||||
import im.vector.lib.core.utils.epoxy.charsequence.toEpoxyCharSequence
|
import im.vector.lib.core.utils.epoxy.charsequence.toEpoxyCharSequence
|
||||||
import me.gujun.android.span.span
|
import me.gujun.android.span.span
|
||||||
|
@ -141,7 +141,7 @@ class SpaceDirectoryController @Inject constructor(
|
||||||
val filteredChildInfo = flattenChildInfo.filter { matchFilter.test(it) }
|
val filteredChildInfo = flattenChildInfo.filter { matchFilter.test(it) }
|
||||||
|
|
||||||
if (filteredChildInfo.isEmpty()) {
|
if (filteredChildInfo.isEmpty()) {
|
||||||
spaceDirectoryFilterNoResults {
|
spaceDirectoryFilterNoResultsItem {
|
||||||
id("no_results")
|
id("no_results")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -214,7 +214,7 @@ class SpaceAddRoomFragment :
|
||||||
roomEpoxyController.submitList(it)
|
roomEpoxyController.submitList(it)
|
||||||
}
|
}
|
||||||
listenItemCount(viewModel.roomCountFlow) { roomEpoxyController.totalSize = 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)
|
views.roomList.setHasFixedSize(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ class SpacePreviewController @Inject constructor(
|
||||||
subSpaceItem {
|
subSpaceItem {
|
||||||
id(child.roomId)
|
id(child.roomId)
|
||||||
roomId(child.roomId)
|
roomId(child.roomId)
|
||||||
title(child.name)
|
title(child.name ?: "")
|
||||||
depth(depth)
|
depth(depth)
|
||||||
avatarUrl(child.avatarUrl)
|
avatarUrl(child.avatarUrl)
|
||||||
avatarRenderer(host.avatarRenderer)
|
avatarRenderer(host.avatarRenderer)
|
||||||
|
|
Loading…
Reference in New Issue