NewPipe icon indicating copy to clipboard operation
NewPipe copied to clipboard

Don't write defaultFormat setting, use default value

Open Profpatsch opened this issue 1 year ago • 1 comments

Nowhere else does this (write a setting if it’s not set).

It took me a while to see that this code does not do what it intends, because defaultFormat is already the default value in the first context.getString, so calling getMediaFormatFromKey again is the exact same call (“do you know the definition of insanity…”) and will return null again …

So let’s drop the setting write and just rely on the default values.

What is it?

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

Due diligence

Profpatsch avatar Jan 06 '24 16:01 Profpatsch

It’s a 2 line straight-forward function, what good would a test do?

Profpatsch avatar Mar 24 '24 13:03 Profpatsch