diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/util/VaultItemListingDataExtensions.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/util/VaultItemListingDataExtensions.kt index 6145324d5..2d0a97779 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/util/VaultItemListingDataExtensions.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/util/VaultItemListingDataExtensions.kt @@ -9,12 +9,15 @@ import com.bitwarden.core.SendType import com.bitwarden.core.SendView import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.components.model.IconData +import com.x8bit.bitwarden.ui.platform.util.toFormattedPattern import com.x8bit.bitwarden.ui.tools.feature.send.util.toLabelIcons import com.x8bit.bitwarden.ui.tools.feature.send.util.toOverflowActions import com.x8bit.bitwarden.ui.vault.feature.itemlisting.VaultItemListingState import com.x8bit.bitwarden.ui.vault.feature.vault.util.toLoginIconData import java.time.Clock +private const val DELETION_DATE_PATTERN: String = "MMM d, uuuu, hh:mm a" + /** * Determines a predicate to filter a list of [CipherView] based on the * [VaultItemListingState.ItemListingType]. @@ -197,7 +200,7 @@ private fun SendView.toDisplayItem( VaultItemListingState.DisplayItem( id = id.orEmpty(), title = name, - subtitle = deletionDate.toString(), + subtitle = deletionDate.toFormattedPattern(DELETION_DATE_PATTERN, clock.zone), iconData = IconData.Local( iconRes = when (type) { SendType.TEXT -> R.drawable.ic_send_text diff --git a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/util/VaultItemListingDataUtil.kt b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/util/VaultItemListingDataUtil.kt index 7a028bd3d..dfc1f7574 100644 --- a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/util/VaultItemListingDataUtil.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/util/VaultItemListingDataUtil.kt @@ -78,7 +78,7 @@ fun createMockDisplayItemForSend( VaultItemListingState.DisplayItem( id = "mockId-$number", title = "mockName-$number", - subtitle = "2023-10-27T12:00:00Z", + subtitle = "Oct 27, 2023, 12:00 PM", iconData = IconData.Local(R.drawable.ic_send_file), extraIconList = listOf( IconRes( @@ -108,7 +108,7 @@ fun createMockDisplayItemForSend( VaultItemListingState.DisplayItem( id = "mockId-$number", title = "mockName-$number", - subtitle = "2023-10-27T12:00:00Z", + subtitle = "Oct 27, 2023, 12:00 PM", iconData = IconData.Local(R.drawable.ic_send_text), extraIconList = listOf( IconRes(