mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2026-05-16 04:52:39 +02:00
Recommendation mostly finished.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
+6
-2
@@ -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
|
||||
|
||||
+12
-5
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Submodule app/src/unstable/assets/sources/youtube updated: 0c11c56691...3b1301572d
Reference in New Issue
Block a user