Overlapping text on newly published video #1012

Closed
opened 2020-09-16 19:49:10 +02:00 by clay53 · 6 comments
clay53 commented 2020-09-16 19:49:10 +02:00 (Migrated from github.com)

Screenshot_20200916-134640_LBRY.jpg

![Screenshot_20200916-134640_LBRY.jpg](https://user-images.githubusercontent.com/16981283/93373453-e1530380-f844-11ea-8a9a-d09ca4554dd4.jpg)
kekkyojin commented 2020-09-16 20:10:09 +02:00 (Migrated from github.com)

LBRY Android app version, @clay53 ?

LBRY Android app version, @clay53 ?
clay53 commented 2020-09-16 20:11:36 +02:00 (Migrated from github.com)

Sorry, latest master 722c829

Sorry, latest master 722c829
ycohen-dev commented 2020-10-10 14:48:47 +02:00 (Migrated from github.com)

So, I've looked into this cause I think it is a good first time bug fix.
The problem (I think) is with the logic deciding the visibility of the "Pending" string.
It looks like the code intended to toggle between "Pending" and the publishing time string - never both

ClaimListAdapter.java
vh.publishTimeView.setVisibility(!isPending ? View.VISIBLE : View.GONE);
vh.pendingTextView.setVisibility(isPending && !item.isLoadingPlaceholder() ? View.VISIBLE : View.GONE);

All good so far - but few lines down below we have the following line:
Helper.setViewVisibility(vh.publishTimeView, !item.isLoadingPlaceholder() ? View.VISIBLE : View.GONE);

Now we are ignoring the pending state and just turn on the visibility.
I think that we can delete that line.
The thing that confuses me is the usage of the Helper - it is used here to guard us from applying view methods on a null
view.
Why would it be necessary?
We already addressed PublishTimeView without the null guard, is this some kind of concurrency issue - causing the view reference to be null in the middle of onBindViewHolder method?

Anyway , I'll create a PR for the suggested fix soon.

So, I've looked into this cause I think it is a good first time bug fix. The problem (I think) is with the logic deciding the visibility of the "Pending" string. It looks like the code intended to toggle between "Pending" and the publishing time string - never both ClaimListAdapter.java `vh.publishTimeView.setVisibility(!isPending ? View.VISIBLE : View.GONE);` `vh.pendingTextView.setVisibility(isPending && !item.isLoadingPlaceholder() ? View.VISIBLE : View.GONE);` All good so far - but few lines down below we have the following line: `Helper.setViewVisibility(vh.publishTimeView, !item.isLoadingPlaceholder() ? View.VISIBLE : View.GONE);` Now we are ignoring the pending state and just turn on the visibility. I think that we can delete that line. The thing that confuses me is the usage of the Helper - it is used here to guard us from applying view methods on a null view. Why would it be necessary? We already addressed PublishTimeView without the null guard, is this some kind of concurrency issue - causing the view reference to be null in the middle of onBindViewHolder method? Anyway , I'll create a PR for the suggested fix soon.
ycohen-dev commented 2020-10-10 15:27:17 +02:00 (Migrated from github.com)

Added PR for the fix
#1026

Added PR for the fix #1026
ycohen-dev commented 2020-10-15 18:39:35 +02:00 (Migrated from github.com)

Hey @clay53 , you can close this issue.

@akinwale fixed it in commit 3d48fa5741

Hey @clay53 , you can close this issue. @akinwale fixed it in commit 3d48fa574189c30398cb12bc154530f1e7e38f79
tzarebczan commented 2020-11-20 01:59:35 +01:00 (Migrated from github.com)

hey @ycohen-dev , sorry for not following up earlier, but thanks for all the help on the repo! Can we show you some appreciation?

hey @ycohen-dev , sorry for not following up earlier, but thanks for all the help on the repo! Can we show you [some appreciation](https://lbry.com/faq/appreciation)?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-android#1012
No description provided.