-
Notifications
You must be signed in to change notification settings - Fork 862
Added Library Poster Size Slider #2714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ import com.lagradost.cloudstream3.ui.BasePreferenceFragmentCompat | |
| import com.lagradost.cloudstream3.ui.clear | ||
| import com.lagradost.cloudstream3.ui.home.HomeChildItemAdapter | ||
| import com.lagradost.cloudstream3.ui.home.ParentItemAdapter | ||
| import com.lagradost.cloudstream3.ui.library.PageAdapter | ||
| import com.lagradost.cloudstream3.ui.search.SearchAdapter | ||
| import com.lagradost.cloudstream3.ui.search.SearchResultBuilder | ||
| import com.lagradost.cloudstream3.ui.settings.Globals.EMULATOR | ||
|
|
@@ -65,6 +66,11 @@ class SettingsUI : BasePreferenceFragmentCompat() { | |
| true | ||
| } | ||
|
|
||
| getPref(R.string.library_poster_size_key)?.setOnPreferenceChangeListener { _, newValue -> | ||
| context?.let { PageAdapter.updatePosterSize(null, it, newValue as? Int) } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This makes no sense as a piece of code, it will only waste CPU cycles. This will do |
||
| true | ||
| } | ||
|
|
||
| getPref(R.string.poster_ui_key)?.setOnPreferenceClickListener { | ||
| val prefNames = resources.getStringArray(R.array.poster_ui_options) | ||
| val keys = resources.getStringArray(R.array.poster_ui_options_values) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -743,8 +743,10 @@ | |
| </string> | ||
| <string name="overscan_settings_des">Changes the bounds of the screen</string> | ||
| <string name="overscan_settings">Overscan</string> | ||
| <string name="poster_size_settings_des">Changes size of posters</string> | ||
| <string name="poster_size_settings">Poster size</string> | ||
| <string name="poster_size_settings_des">Changes the number of poster columns</string> | ||
| <string name="poster_size_settings">Poster columns</string> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is just false, poster size does not change the poster columns.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am sorry but that actually IS what i had the setting do, i swapped from size to column count which automatically resizes the posters, should i revert back to slider up > poster size increase?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are confusing You did swap the library poster setting, but you did not swap the normal poster setting. The normal poster setting does not change columns, it changes the size. You should therefore revert the changes to |
||
| <string name="library_poster_size_settings_des">Changes the number of library poster columns</string> | ||
| <string name="library_poster_size_settings">Library poster columns</string> | ||
| <string name="speedup_title">LongPress Speed Toggle</string> | ||
| <string name="speedup_summary">Hold to get 2x speed</string> | ||
| <string name="edit_profile_image_title">Edit Profile Image</string> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,7 +35,7 @@ | |
| app:showSeekBarValue="true" /> | ||
|
|
||
| <SeekBarPreference | ||
| android:defaultValue="0" | ||
| android:defaultValue="5" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why change the default value here?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The duplicate defaultValue was already removed in a previous commit the current file only has one defaultValue per SeekBarPreference. Though im also confused as to why its not flagging this as outdated. Or maybe the change is too small to be flagged as outdated
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not removed? You still have |
||
| android:icon="@drawable/baseline_grid_view_24" | ||
| android:key="@string/poster_size_key" | ||
| android:max="15" | ||
|
|
@@ -45,6 +45,18 @@ | |
| app:min="0" | ||
| app:seekBarIncrement="1" | ||
| app:showSeekBarValue="true" /> | ||
|
|
||
| <SeekBarPreference | ||
| android:defaultValue="3" | ||
| android:icon="@drawable/baseline_grid_view_24" | ||
| android:key="@string/library_poster_size_key" | ||
| android:max="10" | ||
| android:summary="@string/library_poster_size_settings_des" | ||
| android:title="@string/library_poster_size_settings" | ||
| app:adjustable="true" | ||
| app:min="1" | ||
| app:seekBarIncrement="1" | ||
| app:showSeekBarValue="true" /> | ||
| </PreferenceCategory> | ||
|
|
||
| <PreferenceCategory android:title="@string/pref_category_ui_features"> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes no sense as a companion object function since you are affecting the PageAdapter's AutofitRecyclerView.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am SO sorry for my behavior and thank you so much for being patient with me, the next time i request a review, i wont disappoint, and im very new to open source and i dont wanna force my code into cloudstream, i will fix all of these in the next review.