Recommendation mostly finished.

This commit is contained in:
Koen J 2024-09-06 16:00:13 +02:00
parent be5920cfae
commit 85c9cd0a6e
6 changed files with 27 additions and 9 deletions

View file

@ -489,6 +489,9 @@ class Settings : FragmentedStorageFileJson() {
@DropdownFieldOptionsId(R.array.comment_sections)
var defaultCommentSection: Int = 1;
@FormField(R.string.default_recommendations, FieldForm.TOGGLE, R.string.default_recommendations_description, 0)
var recommendationsDefault: Boolean = false;
@FormField(R.string.bad_reputation_comments_fading, FieldForm.TOGGLE, R.string.bad_reputation_comments_fading_description, 0)
var badReputationCommentsFading: Boolean = true;
}

View file

@ -1294,8 +1294,12 @@ class VideoDetailView : ConstraintLayout {
if (video is TutorialFragment.TutorialVideo) {
setTabIndex(0, true)
} else {
val commentType = !Settings.instance.other.polycentricEnabled || Settings.instance.comments.defaultCommentSection == 1
setTabIndex(if (commentType) 1 else 0, true)
if (Settings.instance.comments.recommendationsDefault) {
setTabIndex(2)
} else {
val commentType = !Settings.instance.other.polycentricEnabled || Settings.instance.comments.defaultCommentSection == 1
setTabIndex(if (commentType) 1 else 0, true)
}
}
//UI

View file

@ -170,11 +170,18 @@ open class PreviewVideoView : LinearLayout {
_imageNeopassChannel?.visibility = View.GONE;
_creatorThumbnail?.setThumbnail(content.author.thumbnail, false);
_imageChannel?.let {
Glide.with(_imageChannel)
.load(content.author.thumbnail)
.placeholder(R.drawable.placeholder_channel_thumbnail)
.into(_imageChannel);
val thumbnail = content.author.thumbnail
if (thumbnail != null) {
_imageChannel?.visibility = View.VISIBLE
_imageChannel?.let {
Glide.with(_imageChannel)
.load(content.author.thumbnail)
.placeholder(R.drawable.placeholder_channel_thumbnail)
.into(_imageChannel);
}
} else {
_imageChannel?.visibility = View.GONE
}
_textChannelName.text = content.author.name

View file

@ -522,7 +522,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal">
android:gravity="center_horizontal"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp">
</LinearLayout>
<com.futo.platformplayer.views.comments.AddCommentView

View file

@ -412,6 +412,8 @@
<string name="preferred_preview_quality_description">Default quality while previewing a video in a feed</string>
<string name="primary_language">Primary Language</string>
<string name="default_comment_section">Default Comment Section</string>
<string name="default_recommendations">Recommendations as Default</string>
<string name="default_recommendations_description">Show recommendations as default, instead of comments.</string>
<string name="bad_reputation_comments_fading">Bad Reputation Comment Fading</string>
<string name="bad_reputation_comments_fading_description">If comments with a very bad reputation should be faded. Disabling may worsen experience.</string>
<string name="reinstall_embedded_plugins">Reinstall Embedded Plugins</string>

@ -1 +1 @@
Subproject commit 0c11c566918647fb6d3d010deeeb8312c94d3437
Subproject commit 3b1301572d3960a1fee8b2e5083aae9d52c13d14