Skip to content

Commit

Permalink
refactor: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
jarnedemeulemeester committed Oct 23, 2023
1 parent e210691 commit e32b4ee
Show file tree
Hide file tree
Showing 13 changed files with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fun getStorageSelectionDialog(
.setItems(locations) { _, which ->
onItemSelected(which)
}
.setOnCancelListener() {
.setOnCancelListener {
onCancel()
}.create()
return dialog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import androidx.preference.PreferenceFragmentCompat
import androidx.preference.SwitchPreferenceCompat
import dev.jdtech.jellyfin.core.R as CoreR

@Suppress("unused")
class SettingsAppearanceFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
setPreferencesFromResource(CoreR.xml.fragment_settings_appearance, rootKey)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import androidx.preference.EditTextPreference
import androidx.preference.PreferenceFragmentCompat
import dev.jdtech.jellyfin.core.R as CoreR

@Suppress("unused")
class SettingsCacheFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
setPreferencesFromResource(CoreR.xml.fragment_settings_cache, rootKey)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import dev.jdtech.jellyfin.viewmodels.SettingsDeviceViewModel
import dev.jdtech.jellyfin.core.R as CoreR

@AndroidEntryPoint
@Suppress("unused")
class SettingsDeviceFragment : PreferenceFragmentCompat() {

private val viewModel: SettingsDeviceViewModel by viewModels()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import android.os.Bundle
import androidx.preference.PreferenceFragmentCompat
import dev.jdtech.jellyfin.core.R as CoreR

@Suppress("unused")
class SettingsDownloadsFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
setPreferencesFromResource(CoreR.xml.fragment_settings_downloads, rootKey)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import dev.jdtech.jellyfin.core.R as CoreR

@Suppress("unused")
class SettingsLanguageFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
setPreferencesFromResource(CoreR.xml.fragment_settings_language, rootKey)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import androidx.preference.PreferenceFragmentCompat
import dev.jdtech.jellyfin.Constants
import dev.jdtech.jellyfin.core.R as CoreR

@Suppress("unused")
class SettingsNetworkFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
setPreferencesFromResource(CoreR.xml.fragment_settings_network, rootKey)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import dev.jdtech.jellyfin.core.R as CoreR

@Suppress("unused")
class SettingsPlayerFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
setPreferencesFromResource(CoreR.xml.fragment_settings_player, rootKey)
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/dev/jdtech/jellyfin/models/HomeItem.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dev.jdtech.jellyfin.models
import java.util.UUID

sealed class HomeItem {
object OfflineCard : HomeItem() {
data object OfflineCard : HomeItem() {
override val id: UUID = UUID.fromString("dbfef8a9-7ff0-4c36-9e36-81dfd65fdd46")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ constructor(
data class Error(val error: Exception) : UiState()
}

lateinit var season: FindroidSeason
private lateinit var season: FindroidSeason

fun loadEpisodes(seriesId: UUID, seasonId: UUID, offline: Boolean) {
viewModelScope.launch {
Expand Down
2 changes: 1 addition & 1 deletion data/src/main/java/dev/jdtech/jellyfin/models/SortBy.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.jdtech.jellyfin.models

enum class SortBy(val SortString: String) {
enum class SortBy(val sortString: String) {
NAME("SortName"),
IMDB_RATING("CommunityRating"),
PARENTAL_RATING("CriticRating"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class JellyfinRepositoryImpl(
parentId = parentId,
includeItemTypes = includeTypes,
recursive = recursive,
sortBy = listOf(sortBy.SortString),
sortBy = listOf(sortBy.sortString),
sortOrder = listOf(sortOrder),
startIndex = startIndex,
limit = limit,
Expand Down
1 change: 0 additions & 1 deletion preferences/src/main/java/dev/jdtech/jellyfin/Constants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ object Constants {
const val PREF_PLAYER_INTRO_SKIPPER = "pref_player_intro_skipper"
const val PREF_PLAYER_TRICK_PLAY = "pref_player_trick_play"
const val PREF_PLAYER_PIP_GESTURE = "pref_player_picture_in_picture_gesture"
const val PREF_PLAYER_PIP_ASPECT_RATIO = "pref_player_picture_in_picture_aspect_ratio"
const val PREF_AUDIO_LANGUAGE = "pref_audio_language"
const val PREF_SUBTITLE_LANGUAGE = "pref_subtitle_language"
const val PREF_IMAGE_CACHE = "pref_image_cache"
Expand Down

0 comments on commit e32b4ee

Please sign in to comment.