Skip to content

Commit fb874af

Browse files
[Fix] Prevent duplicate link error during creation (#190)
1 parent 201718d commit fb874af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/java/com/yogeshpaliyal/deepr/ui/screens/home/HomeBottomContent.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ fun HomeBottomContent(
114114
// Normalize the link before saving
115115
val normalizedLink = normalizeLink(deeprInfo.link)
116116

117-
if (deeprQueries.getDeeprByLink(normalizedLink).executeAsOneOrNull() != null) {
117+
if (isCreate && deeprQueries.getDeeprByLink(normalizedLink).executeAsOneOrNull() != null) {
118118
Toast.makeText(context, deeplinkExistsText, Toast.LENGTH_SHORT).show()
119119
return@save
120120
}

0 commit comments

Comments
 (0)