Skip to content

Commit

Permalink
fix: ui bug with format sorting dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
JunkFood02 committed Dec 22, 2023
1 parent 72c2113 commit f261d1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ import com.junkfood.seal.util.PreferenceStrings
import com.junkfood.seal.util.PreferenceUtil
import com.junkfood.seal.util.PreferenceUtil.getBoolean
import com.junkfood.seal.util.PreferenceUtil.getInt
import com.junkfood.seal.util.PreferenceUtil.getString
import com.junkfood.seal.util.PreferenceUtil.updateBoolean
import com.junkfood.seal.util.PreferenceUtil.updateInt
import com.junkfood.seal.util.PreferenceUtil.updateString
Expand Down Expand Up @@ -127,14 +128,15 @@ fun DownloadSettingDialog(
var videoQuality by VIDEO_QUALITY.intState
var cookies by COOKIES.booleanState
var formatSorting by FORMAT_SORTING.booleanState
var sortingFields by SORTING_FIELDS.stringState

var showAudioSettingsDialog by remember { mutableStateOf(false) }
var showVideoQualityDialog by remember { mutableStateOf(false) }
var showVideoFormatDialog by remember { mutableStateOf(false) }
var showAudioConversionDialog by remember { mutableStateOf(false) }
var showFormatSortingDialog by remember { mutableStateOf(false) }

var sortingFields by remember(showFormatSortingDialog) { mutableStateOf(SORTING_FIELDS.getString()) }

var showTemplateSelectionDialog by remember { mutableStateOf(false) }
var showTemplateCreatorDialog by remember { mutableStateOf(false) }
var showTemplateEditorDialog by remember { mutableStateOf(false) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import androidx.compose.ui.text.style.TextAlign
import com.junkfood.seal.R
import com.junkfood.seal.ui.common.booleanState
import com.junkfood.seal.ui.common.intState
import com.junkfood.seal.ui.common.stringState
import com.junkfood.seal.ui.component.BackButton
import com.junkfood.seal.ui.component.ConfirmButton
import com.junkfood.seal.ui.component.DismissButton
Expand All @@ -55,6 +54,7 @@ import com.junkfood.seal.util.FORMAT_SELECTION
import com.junkfood.seal.util.FORMAT_SORTING
import com.junkfood.seal.util.PreferenceStrings
import com.junkfood.seal.util.PreferenceUtil
import com.junkfood.seal.util.PreferenceUtil.getString
import com.junkfood.seal.util.PreferenceUtil.updateBoolean
import com.junkfood.seal.util.PreferenceUtil.updateInt
import com.junkfood.seal.util.PreferenceUtil.updateString
Expand Down Expand Up @@ -95,7 +95,7 @@ fun DownloadFormatPreferences(onBackPressed: () -> Unit, navigateToSubtitlePage:
var videoFormat by VIDEO_FORMAT.intState
var videoQuality by VIDEO_QUALITY.intState
var convertFormat by remember { mutableStateOf(PreferenceStrings.getAudioConvertDesc()) }
var sortingFields by SORTING_FIELDS.stringState
var sortingFields by remember(showFormatSorterDialog) { mutableStateOf(SORTING_FIELDS.getString()) }
val audioFormat by remember(showAudioFormatDialog) { mutableStateOf(PreferenceStrings.getAudioFormatDesc()) }
var convertAudio by AUDIO_CONVERT.booleanState
var isFormatSortingEnabled by FORMAT_SORTING.booleanState
Expand Down

0 comments on commit f261d1f

Please sign in to comment.