Skip to content

Commit

Permalink
Merge branch 'release/5.0.2' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
rafakob committed Nov 11, 2023
2 parents ce45d16 + c1d4b72 commit a678fca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ android {

defaultConfig {
applicationId = "com.twofasapp"
versionName = "5.0.1"
versionCode = 5000004
versionName = "5.0.2"
versionCode = 5000005

val versionCodeOffset = 5000000

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ internal fun List<Service>.asBackup(): List<BackupService> {
iconCollection = BackupService.IconCollection(id = s.iconCollectionId)
),
groupId = s.groupId

)
}
}
Expand All @@ -134,14 +133,14 @@ internal fun BackupService.asDomain(
secret = secret,
name = name,
info = otp.account ?: otp.label,
authType = otp.tokenType?.let { enumValueOf<Service.AuthType>(it) } ?: Service.AuthType.TOTP,
authType = otp.tokenType?.let { enumValueOrNull<Service.AuthType>(it) } ?: Service.AuthType.TOTP,
link = otp.link,
issuer = otp.issuer,
period = otp.period,
digits = otp.digits,
hotpCounter = otp.counter,
hotpCounterTimestamp = null,
algorithm = otp.algorithm?.let { enumValueOf<Service.Algorithm>(it) },
algorithm = otp.algorithm?.let { enumValueOrNull<Service.Algorithm>(it) },
groupId = groupId,
imageType = when (icon?.selected) {
BackupService.IconType.Brand -> Service.ImageType.IconCollection
Expand All @@ -153,11 +152,15 @@ internal fun BackupService.asDomain(
iconLight = ServiceIcons.getIcon(iconCollectionId, false),
iconDark = ServiceIcons.getIcon(iconCollectionId, true),
labelText = icon?.label?.text,
labelColor = icon?.label?.backgroundColor?.let { enumValueOf<Service.Tint>(it) },
badgeColor = badge?.color?.let { enumValueOf<Service.Tint>(it) },
labelColor = icon?.label?.backgroundColor?.let { enumValueOrNull<Service.Tint>(it) },
badgeColor = badge?.color?.let { enumValueOrNull<Service.Tint>(it) },
isDeleted = false,
updatedAt = updatedAt,
source = otp.source?.let { enumValueOf<Service.Source>(it) } ?: Service.Source.Manual,
source = when (otp.source?.lowercase()) {
"manual" -> Service.Source.Manual
"link" -> Service.Source.Link
else -> Service.Source.Manual
},
assignedDomains = listOf(),
backupSyncStatus = BackupSyncStatus.NOT_SYNCED,
tags = emptyList(),
Expand Down

0 comments on commit a678fca

Please sign in to comment.