Skip to content

Commit 43cdc2b

Browse files
committed
When adding/editing remote fetch URL, the push URL is replicated if it had the same value
1 parent a51855a commit 43cdc2b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/kotlin/com/jetpackduba/gitnuro/ui/dialogs/AddEditRemoteDialog.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ fun AddEditRemoteDialog(
9191
AdjustableOutlinedTextField(
9292
value = remote.fetchUri,
9393
onValueChange = { newValue ->
94-
remote = remote.copy(fetchUri = newValue)
94+
remote = if (remote.pushUri == remote.fetchUri) {
95+
remote.copy(fetchUri = newValue, pushUri = newValue)
96+
} else {
97+
remote.copy(fetchUri = newValue)
98+
}
9599
},
96100
singleLine = true,
97101
colors = outlinedTextFieldColors(),

0 commit comments

Comments
 (0)