question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Media needs refactoring to remove code that has been rendered useless

See original GitHub issue

Summary:

After analysing the media section i came across the following things which can be removed:

  • The MediaDetailSpacer class has been rendered useless, it was previously used in the fragment_media_detail.xml file but after some recent changes it is not required.

  • The updateTheDarkness method inside MediaDetailFragment was used when we had a partially transparent media detail fragment so that when the user pulls it up the Alpha of the image was changed to make the details readable but now since the design has been completely overhauled i think we should remove this.

This is what the updateTheDarkness method does: Before Scroll Screenshot_20200421_125645_fr free nrw commons beta

After Scroll Screenshot_20200421_125650_fr free nrw commons beta

Would you like to work on the issue? Yes 😃

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
macgillscommented, Apr 21, 2020

I’d say definitely remove MediaDetailSpacer

The fade is sort of nice(?) but I don’t see a reason for it to be there. I’d wait for more people to weigh in on that.

0reactions
kbhardwaj123commented, Apr 22, 2020

since most of us are in favour of removing both i will create a PR for the same

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chapter 4. Improve Code by Removing It - O'Reilly
Chapter 4. Improve Code by Removing It We ascribe beauty to that which is simple; which has no superfluous parts; which exactly answers...
Read more >
Remove unused code - web.dev
This guide will help you get a handle on your project's unused code by showing you how to analyze your project's codebase, and...
Read more >
Code Refactoring Best Practices: When (and When Not) to Do It
Inline refactoring is a way to reduce the number of unnecessary methods while simplifying the code. By finding all calls to the method...
Read more >
Refactoring React Code: Overview - KeenEthics
Think about code formatting, get rid of unnecessary <div>'s and <span>'s, use functional React components, try to avoid arrow function in render, and...
Read more >
How to find dead code in a large react project? - Stack Overflow
Solution: For node projects, run the following command in your project root: npx unimported. If you're using flow type annotations, you need ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found