Glucosio / glucosio-android

Glucosio Android App
GNU General Public License v3.0
338 stars 162 forks source link

Reduce ReadingTools.java hourToSpinnerType code to understand easily #344

Closed HyungJiny closed 6 years ago

HyungJiny commented 7 years ago

I think that the case if hour is over 23 is don't need if you using '%' operation. And 'return 8' repeated. I think my code can reduce repeat code.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.003%) to 16.372% when pulling c96e09c48532b0867d09ab95908c03873c7f3c35 on HyungJiny:FixReadingToolsTest into 2c93700e5d797734bcaf2b9d5d9a68cdb76d3d6b on Glucosio:develop.

ghost commented 7 years ago

@paolorotolo

emartynov commented 7 years ago

Hey! You're right that that case will never run 23 % 23 == 0 and we will never have 24 as hour value. However, I think it might be a bug also, since I expect app should predict sometimes night mode. The question is "when".

ghost commented 7 years ago

@paolorotolo any thoughts on this?

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.003%) to 16.511% when pulling b54b0252e15fcdcd69138b458cebf851e40b1c25 on HyungJiny:FixReadingToolsTest into a429deb5199b9fca7da0e6674b0940e9d1867333 on Glucosio:develop.

emartynov commented 6 years ago

I'm really sorry, but I'm closing PR (due to lack of review and attention to answer to this problem)