@@ -19,8 +19,8 @@ import com.fsck.k9.ui.messagelist.item.MessageViewHolder
1919import com.google.android.material.color.ColorRoles
2020import com.google.android.material.textview.MaterialTextView
2121import kotlin.math.abs
22+ import net.thunderbird.core.android.account.LegacyAccount
2223import net.thunderbird.core.android.account.LegacyAccountDto
23- import net.thunderbird.core.android.account.LegacyAccountWrapper
2424import net.thunderbird.core.architecture.data.DataMapper
2525import net.thunderbird.core.common.action.SwipeAction
2626import net.thunderbird.core.common.action.SwipeActions
@@ -35,8 +35,8 @@ class MessageListSwipeCallback(
3535 private val buildSwipeActions : DomainContract .UseCase .BuildSwipeActions <LegacyAccountDto >,
3636 private val adapter : MessageListAdapter ,
3737 private val listener : MessageListSwipeListener ,
38- accounts : List <LegacyAccountWrapper >,
39- private val legacyAccountWrapperDataMapper : DataMapper <LegacyAccountWrapper , LegacyAccountDto >,
38+ accounts : List <LegacyAccount >,
39+ private val legacyAccountDataMapper : DataMapper <LegacyAccount , LegacyAccountDto >,
4040) : ItemTouchHelper.Callback() {
4141 private var swipeActions: Map <String , SwipeActions > = emptyMap()
4242 private val swipePadding = context.resources.getDimension(R .dimen.messageListSwipeIconPadding).toInt()
@@ -326,7 +326,7 @@ class MessageListSwipeCallback(
326326 return (super .getAnimationDuration(recyclerView, animationType, animateDx, animateDy) * percentage).toLong()
327327 }
328328
329- fun invalidateSwipeActions (accounts : List <LegacyAccountWrapper >) {
329+ fun invalidateSwipeActions (accounts : List <LegacyAccount >) {
330330 swipeActions = buildSwipeActions(accounts)
331331 swipeLeftConfig.apply {
332332 clear()
@@ -338,18 +338,18 @@ class MessageListSwipeCallback(
338338 }
339339 }
340340
341- fun buildSwipeActions (accounts : List <LegacyAccountWrapper >): Map <String , SwipeActions > {
341+ fun buildSwipeActions (accounts : List <LegacyAccount >): Map <String , SwipeActions > {
342342 return buildSwipeActions(
343343 accountUuids = accounts.map { it.uuid }.toSet(),
344344 isIncomingServerPop3 = { account ->
345- legacyAccountWrapperDataMapper .toDomain(account).isIncomingServerPop3()
345+ legacyAccountDataMapper .toDomain(account).isIncomingServerPop3()
346346 },
347- hasArchiveFolder = { account -> legacyAccountWrapperDataMapper .toDomain(account).hasArchiveFolder() },
347+ hasArchiveFolder = { account -> legacyAccountDataMapper .toDomain(account).hasArchiveFolder() },
348348 )
349349 }
350350
351351 private fun setupSwipeActionConfig (
352- accounts : List <LegacyAccountWrapper >,
352+ accounts : List <LegacyAccount >,
353353 resourceProvider : SwipeResourceProvider ,
354354 isLeft : Boolean ,
355355 ): Map <String , SwipeActionConfig > {
@@ -384,8 +384,8 @@ class MessageListSwipeCallback(
384384 private val ViewHolder .messageListItem: MessageListItem ?
385385 get() = (this as ? MessageViewHolder )?.uniqueId?.let { adapter.getItemById(it) }
386386
387- private val MessageListItem .accountWrapper: LegacyAccountWrapper
388- get() = legacyAccountWrapperDataMapper .toDomain(account)
387+ private val MessageListItem .accountWrapper: LegacyAccount
388+ get() = legacyAccountDataMapper .toDomain(account)
389389}
390390
391391fun interface SwipeActionSupportProvider {
0 commit comments