mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-08-03 06:40:19 +00:00
Recommendation mostly finished.
This commit is contained in:
parent
be5920cfae
commit
85c9cd0a6e
6 changed files with 27 additions and 9 deletions
|
@ -489,6 +489,9 @@ class Settings : FragmentedStorageFileJson() {
|
||||||
@DropdownFieldOptionsId(R.array.comment_sections)
|
@DropdownFieldOptionsId(R.array.comment_sections)
|
||||||
var defaultCommentSection: Int = 1;
|
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)
|
@FormField(R.string.bad_reputation_comments_fading, FieldForm.TOGGLE, R.string.bad_reputation_comments_fading_description, 0)
|
||||||
var badReputationCommentsFading: Boolean = true;
|
var badReputationCommentsFading: Boolean = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1294,8 +1294,12 @@ class VideoDetailView : ConstraintLayout {
|
||||||
if (video is TutorialFragment.TutorialVideo) {
|
if (video is TutorialFragment.TutorialVideo) {
|
||||||
setTabIndex(0, true)
|
setTabIndex(0, true)
|
||||||
} else {
|
} else {
|
||||||
val commentType = !Settings.instance.other.polycentricEnabled || Settings.instance.comments.defaultCommentSection == 1
|
if (Settings.instance.comments.recommendationsDefault) {
|
||||||
setTabIndex(if (commentType) 1 else 0, true)
|
setTabIndex(2)
|
||||||
|
} else {
|
||||||
|
val commentType = !Settings.instance.other.polycentricEnabled || Settings.instance.comments.defaultCommentSection == 1
|
||||||
|
setTabIndex(if (commentType) 1 else 0, true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//UI
|
//UI
|
||||||
|
|
|
@ -170,11 +170,18 @@ open class PreviewVideoView : LinearLayout {
|
||||||
|
|
||||||
_imageNeopassChannel?.visibility = View.GONE;
|
_imageNeopassChannel?.visibility = View.GONE;
|
||||||
_creatorThumbnail?.setThumbnail(content.author.thumbnail, false);
|
_creatorThumbnail?.setThumbnail(content.author.thumbnail, false);
|
||||||
_imageChannel?.let {
|
|
||||||
Glide.with(_imageChannel)
|
val thumbnail = content.author.thumbnail
|
||||||
.load(content.author.thumbnail)
|
if (thumbnail != null) {
|
||||||
.placeholder(R.drawable.placeholder_channel_thumbnail)
|
_imageChannel?.visibility = View.VISIBLE
|
||||||
.into(_imageChannel);
|
_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
|
_textChannelName.text = content.author.name
|
||||||
|
|
|
@ -522,7 +522,9 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:gravity="center_horizontal">
|
android:gravity="center_horizontal"
|
||||||
|
android:layout_marginLeft="12dp"
|
||||||
|
android:layout_marginRight="12dp">
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.futo.platformplayer.views.comments.AddCommentView
|
<com.futo.platformplayer.views.comments.AddCommentView
|
||||||
|
|
|
@ -412,6 +412,8 @@
|
||||||
<string name="preferred_preview_quality_description">Default quality while previewing a video in a feed</string>
|
<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="primary_language">Primary Language</string>
|
||||||
<string name="default_comment_section">Default Comment Section</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">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="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>
|
<string name="reinstall_embedded_plugins">Reinstall Embedded Plugins</string>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 0c11c566918647fb6d3d010deeeb8312c94d3437
|
Subproject commit 3b1301572d3960a1fee8b2e5083aae9d52c13d14
|
Loading…
Add table
Add a link
Reference in a new issue