-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fixed Android Bani List index font issue #156
Conversation
changed the index bani list to use unicode
fixed theme label to show "Default" on startup as the setting is set to default but it used to show "Light"
changed the text to Unicode in bani order list |
closes #62 |
screens/Reader.js
Outdated
@@ -154,7 +154,7 @@ class Reader extends React.Component { | |||
// eslint-disable-next-line prefer-destructuring | |||
if (data) progress = data.progress; | |||
} | |||
if (Number(progress) === 1 || Number(progress) > 1) { | |||
if (Number(progress) === 1 || Number(progress) > 0.9) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition goes like if Number is 1 then make the progress 0 OR Number is greater than 0.9 then make the progress 0. Can't this be just like
if (Number(progress) > 0.9)
Why do we need the first condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Earlier I used a condition for progress greater than 1 or equal to 1. However, I forgot to change the updated version.
utils/helpers.js
Outdated
@@ -4,6 +4,7 @@ | |||
|
|||
import { Alert } from "react-native"; | |||
import Strings from "./localization"; | |||
// import * as Anvaad from "anvaad-js"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented code can be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
utils/helpers.js
Outdated
color = nightMode ? "#77baff" : "#0066FF"; | ||
} | ||
if (header === 2 || header === 6) { | ||
return nightMode ? "#BFBFBF" : "#727272"; | ||
color = nightMode ? "#BFBFBF" : "#727272"; | ||
} | ||
return nightMode ? "#fff" : "#000"; | ||
color = nightMode ? "#fff" : "#000"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
color will always be "#fff" or "#000" both the above conditions will be ignored.
The last line should be in else part. Also, the above two conditions should be nested if instead of direct two ifs to save execution time.
Can be something like
if (header === 1) {
color = nightMode ? "#77baff" : "#0066FF";
} else if (header === 2 || header === 6) {
color = nightMode ? "#BFBFBF" : "#727272";
} else {
color = nightMode ? "#fff" : "#000";
}
break;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
color = nightMode ? "#77baff" : "#0066FF"; | ||
break; | ||
case TextType.ENGLISH_TRANSLATION: | ||
return nightMode ? "#BFBFBF" : "#727272"; | ||
color = nightMode ? "#BFBFBF" : "#727272"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
veerji why did we change the return statement to a variable and then return the variable instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's because of this https://eslint.org/docs/latest/rules/consistent-return
Fixed android bani list index font issue from Slack
Changed the text to unicode using anvaad-js to avoid further issue