refactor: remove branch input for cloning
This commit is contained in:
parent
014c7a62c0
commit
74711fcc78
3 changed files with 3 additions and 24 deletions
|
@ -83,7 +83,6 @@ class GitServerConfigActivity : BaseGitActivity() {
|
||||||
setAuthModes(it.startsWith("http://") || it.startsWith("https://"))
|
setAuthModes(it.startsWith("http://") || it.startsWith("https://"))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
binding.serverBranch.setText(gitSettings.branch)
|
|
||||||
|
|
||||||
binding.serverUrl.doOnTextChanged { text, _, _, _ ->
|
binding.serverUrl.doOnTextChanged { text, _, _, _ ->
|
||||||
if (text.isNullOrEmpty()) return@doOnTextChanged
|
if (text.isNullOrEmpty()) return@doOnTextChanged
|
||||||
|
|
|
@ -19,6 +19,6 @@ class CloneOperation(callingActivity: AppCompatActivity, uri: String) :
|
||||||
|
|
||||||
override val commands: Array<GitCommand<out Any>> =
|
override val commands: Array<GitCommand<out Any>> =
|
||||||
arrayOf(
|
arrayOf(
|
||||||
Git.cloneRepository().setBranch(remoteBranch).setDirectory(repository.workTree).setURI(uri),
|
Git.cloneRepository().setDirectory(repository.workTree).setURI(uri),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?android:attr/windowBackground"
|
android:background="?android:attr/windowBackground"
|
||||||
android:padding="@dimen/activity_horizontal_margin"
|
android:padding="@dimen/activity_horizontal_margin"
|
||||||
tools:background="@color/white"
|
|
||||||
tools:context="app.passwordstore.ui.git.config.GitServerConfigActivity">
|
tools:context="app.passwordstore.ui.git.config.GitServerConfigActivity">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
@ -33,26 +32,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:imeOptions="actionNext"
|
android:imeOptions="actionNext"
|
||||||
android:inputType="textWebEmailAddress"
|
android:inputType="textWebEmailAddress"
|
||||||
android:nextFocusForward="@id/server_branch" />
|
android:nextFocusForward="@id/auth_mode_group" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/label_server_branch"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:hint="@string/server_branch"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/label_server_url">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/server_branch"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:imeOptions="actionDone"
|
|
||||||
android:inputType="textNoSuggestions" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
@ -65,7 +45,7 @@
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:text="@string/connection_mode"
|
android:text="@string/connection_mode"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/label_server_branch" />
|
app:layout_constraintTop_toBottomOf="@id/label_server_url" />
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButtonToggleGroup
|
<com.google.android.material.button.MaterialButtonToggleGroup
|
||||||
android:id="@+id/auth_mode_group"
|
android:id="@+id/auth_mode_group"
|
||||||
|
|
Loading…
Reference in a new issue