code should hide this button if the dialog was not tracked.

currently it just adds blue action color but always shows
This commit is contained in:
CarlosEsco 2020-04-22 11:19:34 -04:00
parent beeabe17c4
commit f331b24386

View File

@ -64,7 +64,9 @@ class TrackSearchDialog : DialogController {
customView(viewRes = R.layout.track_search_dialog, scrollable = false)
negativeButton(android.R.string.cancel)
positiveButton(R.string.clear) { onPositiveButtonClick() }
setActionButtonEnabled(WhichButton.POSITIVE, wasPreviouslyTracked)
if (wasPreviouslyTracked) {
positiveButton(R.string.clear) { onPositiveButtonClick() }
}
}
if (subscriptions.isUnsubscribed) {