Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show stream uploader icon on comments they have replied to #11991

Open
wants to merge 3 commits into
base: refactor
Choose a base branch
from

Conversation

Isira-Seneviratne
Copy link
Member

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • Display the stream uploader avatar on comments that they have replied to, similar to the YouTube app.

Before/After Screenshots/Screen Record

  • Before:

Screenshot_20250201-105128

  • After:

Screenshot_20250201-105103

Fixes the following issue(s)

  • Fixes #

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

@github-actions github-actions bot added the size/medium PRs with less than 250 changed lines label Feb 2, 2025
@AudricV AudricV added GUI Issue is related to the graphical user interface multiservice Issues related to multiple services comments Anything to do with comments and comment replies under videos/audios rewrite Issues and PRs related to rewrite labels Feb 2, 2025
Comment on lines +31 to +40
val streamState = url
.map {
try {
Resource.Success(ExtractorHelper.getStreamInfo(serviceId, it, true).await())
} catch (e: Exception) {
Resource.Error(e)
}
}
.flowOn(Dispatchers.IO)
.stateIn(viewModelScope, SharingStarted.WhileSubscribed(), Resource.Loading)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this result in loading twice StreamInfo when VideoDetailFragment is loaded, as loading calls for player and comments would be concurrent?

If so, then this approach must be not be used due to the time and resources used to fetch info (especially for YouTube streams).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't the cache value be used instead, by setting the boolean to false?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the solution to this is to have the VideoDetailFragment pass the channel avatar URL to the comment section (null at the beginning, then set once video info load). This is probably hard to do now, but will be easy once the VDF is also written in Compose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comments Anything to do with comments and comment replies under videos/audios GUI Issue is related to the graphical user interface multiservice Issues related to multiple services rewrite Issues and PRs related to rewrite size/medium PRs with less than 250 changed lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants