Skip to content

Commit

Permalink
Address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsvanvelzen committed Jul 23, 2022
1 parent 59d8097 commit 8a9c94b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class PictureViewerFragment : Fragment(), View.OnKeyListener {
/**
* The download API is used by jellyfin-web when loading images. Unfortunately with our
* current code it doesn't work for the app. Larger files (gifs, large photos etc.) can
* cause the app to go out of memory. This is mostly catched by Glide but it ends up
* cause the app to go out of memory. This is mostly caught by Glide but it ends up
* never displaying the picture in those cases.
*
* This toggle is left in the code in case we migrate to a different image processor that
Expand Down Expand Up @@ -87,7 +87,10 @@ class PictureViewerFragment : Fragment(), View.OnKeyListener {
keyDown(KeyEvent.KEYCODE_MEDIA_SKIP_FORWARD, KeyEvent.KEYCODE_MEDIA_NEXT)
.body { pictureViewerViewModel.showNext() }

keyDown(KeyEvent.KEYCODE_DPAD_UP, KeyEvent.KEYCODE_ENTER, KeyEvent.KEYCODE_DPAD_CENTER)
keyDown(
KeyEvent.KEYCODE_DPAD_UP, KeyEvent.KEYCODE_DPAD_DOWN,
KeyEvent.KEYCODE_ENTER, KeyEvent.KEYCODE_DPAD_CENTER,
)
.condition { !binding.actions.isVisible }
.body { showActions() }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class PictureViewerViewModel(private val api: ApiClient) : ViewModel() {
_currentItem.value = itemResponse

val albumResponse by api.itemsApi.getItemsByUserId(
parentId = itemResponse.albumId,
parentId = itemResponse.parentId,
includeItemTypes = setOf(BaseItemKind.PHOTO),
fields = setOf(ItemFields.PRIMARY_IMAGE_ASPECT_RATIO),
sortBy = listOf(ItemFields.SORT_NAME.name), // TODO: Order should be consistent with the stdgridview the user comes from, which allows to change the order
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class DeveloperPreferencesScreen : OptionsFragment() {
}

checkbox {
title = "Enable new picture viewer"
title = getString(R.string.enable_picture_viewer_title)
setContent(R.string.enable_playback_module_description)

bind(userPreferences, UserPreferences.pictureViewerRewriteEnabled)
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -498,4 +498,5 @@
<string name="pref_crash_report_logs_disabled">Logs will not be included in crash reports</string>
<string name="crash_report_toast">Oops! Something went wrong, a crash report was send to your Jellyfin server.</string>
<string name="server_setup_incomplete">The setup of this server has not been completed. Open Jellyfin in a web browser to finish setup before signing in.</string>
<string name="enable_picture_viewer_title">Enable new picture viewer</string>
</resources>

0 comments on commit 8a9c94b

Please sign in to comment.