Skip to content

Commit

Permalink
fix(rtl): fixed render element when languages is right to left
Browse files Browse the repository at this point in the history
  • Loading branch information
Giacomo Materozzi committed Jul 14, 2021
1 parent c1a2fb2 commit a220ccc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/VirtualRenderer.ts
@@ -1,3 +1,4 @@
import { I18nManager, Platform } from "react-native";
import RecycleItemPool from "../utils/RecycleItemPool";
import { Dimension, BaseLayoutProvider } from "./dependencies/LayoutProvider";
import CustomError from "./exceptions/CustomError";
Expand Down Expand Up @@ -88,7 +89,7 @@ export default class VirtualRenderer {

public updateOffset(offsetX: number, offsetY: number, isActual: boolean, correction: WindowCorrection): void {
if (this._viewabilityTracker) {
const offset = this._params && this._params.isHorizontal ? offsetX : offsetY;
const offset = this._params && this._params.isHorizontal ? I18nManager.isRTL && Platform.OS === "android" ? this.getLayoutDimension().width - offsetX : offsetX : offsetY;
if (!this._isViewTrackerRunning) {
if (isActual) {
this._viewabilityTracker.setActualOffset(offset);
Expand Down

0 comments on commit a220ccc

Please sign in to comment.