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

Fixed Android Bani List index font issue #156

Merged
merged 13 commits into from
Mar 14, 2023
Merged

Conversation

MySmilingTurban
Copy link
Collaborator

@MySmilingTurban MySmilingTurban commented Jan 13, 2023

Fixed android bani list index font issue from Slack
Changed the text to unicode using anvaad-js to avoid further issue

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"
@MySmilingTurban
Copy link
Collaborator Author

MySmilingTurban commented Jan 21, 2023

fixes #138 #147

@MySmilingTurban
Copy link
Collaborator Author

fixes #146 #154

@MySmilingTurban
Copy link
Collaborator Author

changed the text to Unicode in bani order list
(earlier it was not changing the banis in folders)

@MySmilingTurban
Copy link
Collaborator Author

closes #62

@amitojsingh amitojsingh self-requested a review February 27, 2023 21:45
actions/actions.js Outdated Show resolved Hide resolved
screens/Home.js Outdated Show resolved Hide resolved
screens/Home.js Outdated Show resolved Hide resolved
screens/Home.js Outdated Show resolved Hide resolved
screens/Home.js Outdated Show resolved Hide resolved
@@ -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) {

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?

Copy link
Collaborator

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";

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

Copy link
Collaborator

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
Comment on lines 60 to 65
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";

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;

Copy link
Collaborator

Choose a reason for hiding this comment

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

fixed

Comment on lines +69 to +72
color = nightMode ? "#77baff" : "#0066FF";
break;
case TextType.ENGLISH_TRANSLATION:
return nightMode ? "#BFBFBF" : "#727272";
color = nightMode ? "#BFBFBF" : "#727272";

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?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@amitojsingh amitojsingh requested a review from theamanjs March 7, 2023 23:02
@amitojsingh amitojsingh merged commit 465982a into dev Mar 14, 2023
@amitojsingh amitojsingh deleted the android-index-font-issue branch July 28, 2024 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants