Skip to content

Commit

Permalink
update home row layout on refresh so we don't need to restart the app…
Browse files Browse the repository at this point in the history
… after updating setting
  • Loading branch information
cewert committed Nov 9, 2024
1 parent 587e942 commit 5a97f2b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions components/home/HomeRows.bs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ sub updateSize()
' original layout
m.top.translation = [111, 180]
m.top.itemSize = [1703, 330]
' reset to defaults
m.top.focusXOffset = []
m.top.rowLabelOffset = [0, 20]
end if
end if

Expand All @@ -73,9 +76,6 @@ sub updateSize()
' spacing between items in a row
m.top.rowItemSpacing = [21, 0]

' Default size to wide poster, the most used size
m.top.rowItemSize = homeRowItemSizes.WIDE_POSTER

m.top.visible = true
end sub

Expand Down Expand Up @@ -465,6 +465,8 @@ end sub
sub updateHomeRows()
' Hide the row counter to prevent flicker. We'll show it once loading timer fires
m.top.showRowCounter = [false]
m.top.visible = false
updateSize()
processUserSections()
end sub

Expand Down
4 changes: 2 additions & 2 deletions locale/en_US/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1327,8 +1327,8 @@
<extracomment>User Setting - Setting title</extracomment>
</message>
<message>
<source>Choose how rows are displayed on the home screen. Jellyfin will need to be closed and reopened for changes to take effect.</source>
<translation>Choose how rows are displayed on the home screen. Jellyfin will need to be closed and reopened for changes to take effect.</translation>
<source>Choose how rows are displayed on the home screen.</source>
<translation>Choose how rows are displayed on the home screen.</translation>
<extracomment>User Setting - Setting description</extracomment>
</message>
<message>
Expand Down
2 changes: 1 addition & 1 deletion settings/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@
},
{
"title": "Row Layout",
"description": "Choose how rows are displayed on the home screen. Jellyfin will need to be closed and reopened for changes to take effect.",
"description": "Choose how rows are displayed on the home screen.",
"settingName": "ui.row.layout",
"type": "radio",
"default": "fullwidth",
Expand Down

0 comments on commit 5a97f2b

Please sign in to comment.