forked from jellyfin/jellyfin-androidtv
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework the logic for auto and button
- Loading branch information
1 parent
a79af94
commit ac0d027
Showing
5 changed files
with
61 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 16 additions & 16 deletions
32
app/src/main/java/org/jellyfin/androidtv/ui/playback/segments/SegmentSkipModes.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
package org.jellyfin.androidtv.ui.playback.segments | ||
|
||
import org.jellyfin.androidtv.R | ||
import org.jellyfin.preference.PreferenceEnum | ||
|
||
enum class SegmentMode { | ||
SHOW_SKIP_BUTTON { | ||
override fun icon(): Int = R.drawable.ic_select_skip_show_button | ||
override fun label(): Int = R.string.lbl_show_skip_button | ||
}, | ||
AUTO_SKIP { | ||
override fun icon(): Int = R.drawable.ic_select_skip_auto_skip | ||
override fun label(): Int = R.string.lbl_auto_skip | ||
}, | ||
HIDE_SKIP_BUTTON { | ||
override fun icon(): Int = R.drawable.ic_select_skip_hide_button | ||
override fun label(): Int = R.string.lbl_hide_skip_button | ||
}; | ||
|
||
abstract fun icon(): Int | ||
abstract fun label(): Int | ||
enum class SegmentMode( | ||
override val nameRes: Int, | ||
) : PreferenceEnum { | ||
/** | ||
* Show a skip button | ||
*/ | ||
SHOW_SKIP_BUTTON(R.string.lbl_show_skip_button), | ||
/** | ||
* Automatically skip | ||
*/ | ||
AUTO_SKIP(R.string.lbl_auto_skip), | ||
/** | ||
* No action is taken | ||
*/ | ||
HIDE_SKIP_BUTTON(R.string.lbl_hide_skip_button), | ||
} |