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

Fixes #210

Open
wants to merge 16 commits into
base: dev
Choose a base branch
from
Open

Fixes #210

wants to merge 16 commits into from

Conversation

amitojsingh
Copy link
Collaborator

@amitojsingh amitojsingh commented Oct 16, 2024

  1. Added Crashlytics
  2. Updated code to fetch data of Home Screen if there is Blank screen.
  3. updated Pods
  4. Fix Auto Scroll
  5. Improved Reader and home Screen
  6. Improved Database connect call
  7. Improve Error Handling
  8. Fix Deep Scan errors
  9. Fix Null checks.
  10. remove unnecessary parameters

@amitojsingh amitojsingh changed the title fix: crashlytics minor fixes Nov 10, 2024
@amitojsingh amitojsingh changed the title minor fixes Fixes Nov 11, 2024
Copy link

@Gauravjeetsingh Gauravjeetsingh left a comment

Choose a reason for hiding this comment

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

Added comments in code, mostly minor changes. Have a look.

Also, can you please update the PR title to something more relevant about the changes being done here.

defaultBaniOrder &&
Array.isArray(defaultBaniOrder.baniOrder) &&
defaultBaniOrder.baniOrder.length > 0
) {

Choose a reason for hiding this comment

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

We can make this if statement more readable using optional chaining

if (defaultBaniOrder?.baniOrder?.length) {
...

color={colors.WHITE_COLOR}
/>
);
};

Choose a reason for hiding this comment

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

Minor thing, since it only returns a JSx element, we can write it directly as

const headerLeft = () => (
  <Icon
    name="arrow-back"
    size={30}
    onPress={handleBackPress}
    color={colors.WHITE_COLOR}
  />
);

};
</View>
);
};

Choose a reason for hiding this comment

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

Similar to headerLeft, this can be optimized as well without using return keyword.

const headerRight = () => (
  <View style={{ flexDirection: "row" }}>
    <Icon
      name="bookmark"
      color={colors.TOOLBAR_TINT}
      size={30}
      onPress={handleBookmarkPress}
    />
    <Icon
      name="settings"
      color={colors.TOOLBAR_TINT}
      size={30}
      onPress={handleSettingsPress}
    />
  </View>
);

Animated.timing(animationPosition, {
toValue: value,
duration: 500,
// easing: Easing.ease,

Choose a reason for hiding this comment

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

We can remove this comment if not needed anymore.

let scrollY = (document.body.scrollHeight - window.innerHeight) * ${position};
window.scrollTo(0, scrollY);
let curPosition = scrollY;
function clearScrollTimeout() {

Choose a reason for hiding this comment

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

Can be converted to ES6 arrow function syntax.

autoScrollTimeout = null;
}

function scrollFunc(e) {

Choose a reason for hiding this comment

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

Same as above, can be converted to arrow syntax of function

function setAutoScroll() {
let speed = autoScrollSpeed;
const speed = autoScrollSpeed;

Choose a reason for hiding this comment

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

Can be converted to arrow syntax.


window.addEventListener(
"orientationchange",
function () {

Choose a reason for hiding this comment

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

Can be converted to arrow syntax.

let englishTranslation;
let punjabiTranslation;
let spanishTranslation;
let paragraphID = null;

Choose a reason for hiding this comment

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

Can be changed to camelcase for consistent naming practice paragraphId

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants