mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-12 21:35:18 +01:00
Minor tracking updates from PR
Updated remove tracking strings Login dialog cannot be cancelled while logging in Extremly minor layout changes
This commit is contained in:
parent
7fc84f6924
commit
3bd8f92824
@ -36,19 +36,22 @@ class TrackRemoveDialog<T> : DialogController
|
|||||||
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
||||||
val item = item
|
val item = item
|
||||||
|
|
||||||
val dialog = MaterialDialog(activity!!)
|
val dialog = MaterialDialog(activity!!).title(R.string.remove_tracking)
|
||||||
.title(R.string.remove_tracking)
|
|
||||||
.negativeButton(android.R.string.cancel)
|
.negativeButton(android.R.string.cancel)
|
||||||
|
|
||||||
if (item.service.canRemoveFromService()) {
|
if (item.service.canRemoveFromService()) {
|
||||||
dialog.checkBoxPrompt(
|
dialog.checkBoxPrompt(
|
||||||
text = activity!!.getString(
|
text = activity!!.getString(
|
||||||
R.string.remove_tracking_from_, item.service.name
|
R.string.remove_tracking_from_, item.service.name
|
||||||
), onToggle = null
|
), isCheckedDefault = true, onToggle = null
|
||||||
).positiveButton(android.R.string.ok) { listener.removeTracker(item, it.isCheckPromptChecked()) }
|
).positiveButton(R.string.remove) {
|
||||||
|
listener.removeTracker(
|
||||||
|
item, it.isCheckPromptChecked()
|
||||||
|
)
|
||||||
|
}
|
||||||
dialog.getCheckBoxPrompt().textSize = 16f
|
dialog.getCheckBoxPrompt().textSize = 16f
|
||||||
} else {
|
} else {
|
||||||
dialog.positiveButton(android.R.string.ok) { listener.removeTracker(item, false) }
|
dialog.positiveButton(R.string.remove) { listener.removeTracker(item, false) }
|
||||||
}
|
}
|
||||||
|
|
||||||
return dialog
|
return dialog
|
||||||
|
@ -41,6 +41,8 @@ class TrackLoginDialog(usernameLabel: String? = null, bundle: Bundle? = null) :
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dialog?.setCancelable(false)
|
||||||
|
dialog?.setCanceledOnTouchOutside(false)
|
||||||
val user = username.text.toString()
|
val user = username.text.toString()
|
||||||
val pass = password.text.toString()
|
val pass = password.text.toString()
|
||||||
scope.launch {
|
scope.launch {
|
||||||
@ -62,6 +64,8 @@ class TrackLoginDialog(usernameLabel: String? = null, bundle: Bundle? = null) :
|
|||||||
|
|
||||||
private fun errorResult() {
|
private fun errorResult() {
|
||||||
v?.apply {
|
v?.apply {
|
||||||
|
dialog?.setCancelable(true)
|
||||||
|
dialog?.setCanceledOnTouchOutside(true)
|
||||||
login.revertAnimation {
|
login.revertAnimation {
|
||||||
login.text = activity!!.getText(R.string.unknown_error)
|
login.text = activity!!.getText(R.string.unknown_error)
|
||||||
}
|
}
|
||||||
|
@ -65,31 +65,29 @@
|
|||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
android:paddingTop="16dp"
|
android:paddingTop="16dp"
|
||||||
android:paddingEnd="8dp"
|
android:paddingEnd="30dp"
|
||||||
android:paddingBottom="16dp"
|
android:paddingBottom="16dp"
|
||||||
android:text="@string/title"
|
android:text="@string/title"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/track_remove"
|
app:layout_constraintEnd_toEndOf="@id/status_container"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:text="dfdffggjdfigjssdfgidfjgidgjdifgjfdgifdjgid" />
|
tools:text="Tracking name that is really long so i can see the padding" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/track_remove"
|
android:id="@+id/track_remove"
|
||||||
style="@style/Theme.Widget.CustomImageButton"
|
style="@style/Theme.Widget.CustomImageButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="@string/open_in_webview"
|
|
||||||
android:src="@drawable/ic_close_circle_24dp"
|
|
||||||
android:layout_marginStart="2dp"
|
android:layout_marginStart="2dp"
|
||||||
android:layout_marginEnd="4dp"
|
android:layout_marginEnd="4dp"
|
||||||
|
android:contentDescription="@string/open_in_webview"
|
||||||
|
android:src="@drawable/ic_close_circle_24dp"
|
||||||
android:tint="@color/text_color_secondary"
|
android:tint="@color/text_color_secondary"
|
||||||
android:tooltipText="@string/remove_tracking"
|
android:tooltipText="@string/remove_tracking"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="@id/status_container"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/track_title"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
Loading…
Reference in New Issue
Block a user