Fix cloned profile type

This commit is contained in:
Kr328 committed 2020-04-15 20:44:49 +08:00
1 parent 1d21368385
commit 0748021ffa
2 files changed
+8 -4

No files matched your search

+2 -2
View File
@@ -10,8 +10,8 @@ buildscript {
this["gMinSdkVersion"] = 24
this["gTargetSdkVersion"] = 29
this["gVersionCode"] = 10204
this["gVersionName"] = "1.2.4"
this["gVersionCode"] = 10205
this["gVersionName"] = "1.2.5"
this["gKotlinVersion"] = kotlinVersion
this["gKotlinCoroutineVersion"] = "1.3.5"
@@ -83,8 +83,12 @@ class ProfileService : BaseService() {
val clonedId = generateNextId()
pending[clonedId] =
queryMetadataById(id)?.copy(id = clonedId, active = false, lastModified = 0)
?: return@runBlocking -1L
queryMetadataById(id)?.copy(
id = clonedId,
active = false,
lastModified = 0,
type = Profile.Type.FILE
) ?: return@runBlocking -1L
clonedId
}