mirror of
https://github.com/bitwarden/android.git
synced 2026-06-07 23:11:01 -05:00
Add the send pending deletion icon (#503)
This commit is contained in:
committed by
Álison Fernandes
parent
273763b219
commit
2be770d5fc
@@ -28,4 +28,8 @@ enum class SendStatusIcon(
|
||||
iconRes = R.drawable.ic_send_max_access_count_reached,
|
||||
contentDescription = R.string.maximum_access_count_reached.asText(),
|
||||
),
|
||||
PENDING_DELETE(
|
||||
iconRes = R.drawable.ic_send_pending_delete,
|
||||
contentDescription = R.string.pending_delete.asText(),
|
||||
),
|
||||
}
|
||||
|
||||
@@ -35,16 +35,19 @@ private fun List<SendView>.toSendContent(): SendState.ViewState.Content {
|
||||
SendType.FILE -> SendState.ViewState.Content.SendItem.Type.FILE
|
||||
},
|
||||
iconList = listOfNotNull(
|
||||
SendStatusIcon.EXPIRED.takeIf {
|
||||
sendView.expirationDate?.isBefore(Instant.now()) == true
|
||||
},
|
||||
SendStatusIcon.DISABLED.takeIf { sendView.disabled },
|
||||
sendView.password?.let { SendStatusIcon.PASSWORD },
|
||||
SendStatusIcon.MAX_ACCESS_COUNT_REACHED.takeIf {
|
||||
sendView.maxAccessCount?.let { maxCount ->
|
||||
sendView.accessCount >= maxCount
|
||||
} == true
|
||||
},
|
||||
SendStatusIcon.DISABLED.takeIf { sendView.disabled },
|
||||
SendStatusIcon.EXPIRED.takeIf {
|
||||
sendView.expirationDate?.isBefore(Instant.now()) == true
|
||||
},
|
||||
SendStatusIcon.PENDING_DELETE.takeIf {
|
||||
sendView.deletionDate.isBefore(Instant.now())
|
||||
},
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user