mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-05-05 17:14:37 +02:00
Merge branch 'master' of gitlab.futo.org:videostreaming/grayjay
This commit is contained in:
commit
cfc7cbcaa4
@ -315,7 +315,7 @@ class PostDetailFragment : MainFragment {
|
|||||||
_rating.visibility = View.GONE;
|
_rating.visibility = View.GONE;
|
||||||
|
|
||||||
val ref = Models.referenceFromBuffer((_post?.url ?: _postOverview?.url)?.toByteArray() ?: return)
|
val ref = Models.referenceFromBuffer((_post?.url ?: _postOverview?.url)?.toByteArray() ?: return)
|
||||||
val extraBytesRef = (_post?.id?.value ?: _postOverview?.id?.value)?.toByteArray()
|
val extraBytesRef = (_post?.id?.value ?: _postOverview?.id?.value)?.let { if (it.isNotEmpty()) it.toByteArray() else null }
|
||||||
val version = _version;
|
val version = _version;
|
||||||
|
|
||||||
_rating.onLikeDislikeUpdated.remove(this);
|
_rating.onLikeDislikeUpdated.remove(this);
|
||||||
@ -663,7 +663,7 @@ class PostDetailFragment : MainFragment {
|
|||||||
Logger.i(TAG, "fetchPolycentricComments")
|
Logger.i(TAG, "fetchPolycentricComments")
|
||||||
val post = _post;
|
val post = _post;
|
||||||
val ref = (_post?.url ?: _postOverview?.url)?.toByteArray()?.let { Models.referenceFromBuffer(it) }
|
val ref = (_post?.url ?: _postOverview?.url)?.toByteArray()?.let { Models.referenceFromBuffer(it) }
|
||||||
val extraBytesRef = (_post?.id?.value ?: _postOverview?.id?.value)?.toByteArray()
|
val extraBytesRef = (_post?.id?.value ?: _postOverview?.id?.value)?.let { if (it.isNotEmpty()) it.toByteArray() else null }
|
||||||
|
|
||||||
if (ref == null) {
|
if (ref == null) {
|
||||||
Logger.w(TAG, "Failed to fetch polycentric comments because url was not set null")
|
Logger.w(TAG, "Failed to fetch polycentric comments because url was not set null")
|
||||||
|
@ -1228,7 +1228,7 @@ class VideoDetailView : ConstraintLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val ref = Models.referenceFromBuffer(video.url.toByteArray())
|
val ref = Models.referenceFromBuffer(video.url.toByteArray())
|
||||||
val extraBytesRef = video.id.value?.toByteArray()
|
val extraBytesRef = video.id.value?.let { if (it.isNotEmpty()) it.toByteArray() else null }
|
||||||
_addCommentView.setContext(video.url, ref)
|
_addCommentView.setContext(video.url, ref)
|
||||||
_player.setMetadata(video.name, video.author.name);
|
_player.setMetadata(video.name, video.author.name);
|
||||||
|
|
||||||
@ -1978,14 +1978,14 @@ class VideoDetailView : ConstraintLayout {
|
|||||||
Logger.i(TAG, "fetchPolycentricComments")
|
Logger.i(TAG, "fetchPolycentricComments")
|
||||||
val video = video;
|
val video = video;
|
||||||
val idValue = video?.id?.value
|
val idValue = video?.id?.value
|
||||||
if (idValue == null) {
|
if (video?.url?.isEmpty() != false) {
|
||||||
Logger.w(TAG, "Failed to fetch polycentric comments because id was null")
|
Logger.w(TAG, "Failed to fetch polycentric comments because url was null")
|
||||||
_commentsList.clear()
|
_commentsList.clear()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
val ref = Models.referenceFromBuffer(video.url.toByteArray())
|
val ref = Models.referenceFromBuffer(video.url.toByteArray())
|
||||||
val extraBytesRef = video.id.value?.toByteArray()
|
val extraBytesRef = idValue?.let { if (it.isNotEmpty()) it.toByteArray() else null }
|
||||||
_commentsList.load(false) { StatePolycentric.instance.getCommentPager(video.url, ref, listOfNotNull(extraBytesRef)); };
|
_commentsList.load(false) { StatePolycentric.instance.getCommentPager(video.url, ref, listOfNotNull(extraBytesRef)); };
|
||||||
}
|
}
|
||||||
private fun fetchVideo() {
|
private fun fetchVideo() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user