Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(args) {
super(args);
this.state = {
profiles: [],
};
this._layoutProvider = new LayoutProvider((i) => {
if (this.props.allAssets && i < this.props.allAssets.length) {
return WALLET_ROW;
}
return WALLET_LAST_ROW;
}, (type, dim) => {
if (type === WALLET_ROW) {
dim.width = deviceUtils.dimensions.width;
dim.height = rowHeight;
} else if (type === WALLET_LAST_ROW) {
dim.width = deviceUtils.dimensions.width;
dim.height = rowHeight + lastRowPadding;
} else {
dim.width = 0;
dim.height = 0;
}
});
constructor(props) {
super(props);
this.state = {
dataProvider: new DataProvider(hasRowChanged, this.getStableId),
headersIndices: [],
isRefreshing: false,
itemsCount: 0,
};
this.layoutProvider = new LayoutProvider(
index => {
const { openFamilyTabs, openInvestmentCards, sections } = this.props;
const { headersIndices } = this.state;
if (headersIndices.includes(index)) {
return ViewTypes.HEADER;
}
if (index === this.state.itemsCount - 1) {
return ViewTypes.FOOTER;
}
const balancesIndex = findIndex(
sections,
({ name }) => name === 'balances'
);
constructor(args) {
super(args);
this.state = {
dataProvider: new DataProvider(hasRowChanged, this.getStableId),
headersIndices: [],
};
this.layoutProvider = new LayoutProvider(
index => {
if (index === 0) {
return ViewTypes.COMPONENT_HEADER;
}
if (this.state.headersIndices.includes(index)) {
return ViewTypes.HEADER;
}
if (this.state.headersIndices.includes(index + 1)) {
return ViewTypes.FOOTER;
}
return ViewTypes.ROW;
},
(type, dim) => {
constructor(props) {
super(props)
this.state = {
dataProvider: new DataProvider((r1, r2) => {
return r1 !== r2
}, (index) => {
return this.props.messageList[index].values.msgId
}).cloneWithRows(props.messageList),
refreshing: false
}
this._layoutProvider = new LayoutProvider((i) => {
return this.state.dataProvider.getDataForIndex(i).type
}, (type, dim, index) => {
dim.height = 300
dim.width = width
})
this._renderRow = this._renderRow.bind(this)
this.scrollToIndex = this.scrollToIndex.bind(this)
}
this.emoji = [];
this.loggingFunction = this.props.loggingFunction
? this.props.loggingFunction
: null;
this.verboseLoggingFunction = this.props.verboseLoggingFunction
? this.props.verboseLoggingFunction
: false;
let dataProvider = new DataProvider((e1, e2) => {
return e1.char !== e2.char;
});
this._layoutProvider = new LayoutProvider(
index =>
_.has(this.emoji[index], 'categoryMarker')
? ViewTypes.CATEGORY
: ViewTypes.EMOJI,
(type, dim) => {
switch (type) {
case ViewTypes.CATEGORY:
dim.height = this.props.categoryLabelHeight;
dim.width = props.width;
break;
case ViewTypes.EMOJI:
dim.height = dim.width = this.emojiSize;
break;
}
}
);
this.emoji = [];
this.loggingFunction = this.props.loggingFunction
? this.props.loggingFunction
: null;
this.verboseLoggingFunction = this.props.verboseLoggingFunction
? this.props.verboseLoggingFunction
: false;
let dataProvider = new DataProvider((e1, e2) => {
return e1.char !== e2.char;
});
this._layoutProvider = new LayoutProvider(
index =>
_.has(this.emoji[index], 'categoryMarker')
? ViewTypes.CATEGORY
: ViewTypes.EMOJI,
(type, dim) => {
switch (type) {
case ViewTypes.CATEGORY:
dim.height = this.props.categoryLabelHeight;
dim.width = props.width;
break;
case ViewTypes.EMOJI:
dim.height = dim.width = this.emojiSize;
break;
}
}
);
this.state = {
allEmojiList: [],
category: Categories.people,
colSize: 0,
emojiList: [],
history: [],
isReady: false,
searchQuery: '',
};
this.recentlyRendered = false;
this.touchedContact = undefined;
this.contacts = {};
this._layoutProvider = new LayoutProvider(
i => {
if (i == 0 || i == this.state.allEmojiList.length - 1) {
return OVERLAY;
}
if (i % 2 == 0) {
return EMOJI_CONTAINER;
}
return HEADER_ROW;
},
(type, dim, i) => {
if (type === EMOJI_CONTAINER) {
dim.height =
Math.floor(this.state.allEmojiList[i].data.length / 7 + 1) *
((width - 21) / this.props.columns);
dim.width = deviceUtils.dimensions.width;
} else if (type === HEADER_ROW) {
const getGridProvider = (itemWidth: number, itemHeight: number) => {
if (!layoutProvider) {
layoutProvider = new LayoutProvider(
() => ViewTypes.ITEM_LAYOUT,
(type: number | string, dim: { width: number; height: number }) => {
dim.width = itemWidth;
dim.height = itemHeight;
},
);
}
return layoutProvider;
};
constructor(props) {
super(props);
//Generating data
this._generateData();
//Layout provider for parent list
this._parentRLVLayoutProvider = new LayoutProvider(
index => {
return ViewTypes.SIMPLE_ROW;
},
(type, dim) => {
dim.height = 100;
dim.width = width;
}
);
//Layout provider for children lists
this._childRLVLayoutProvider = new LayoutProvider(
index => {
return ViewTypes.SIMPLE_ROW;
},
(type, dim) => {
dim.height = 100;
constructor(args) {
super(args);
this.state = {
dataProvider: new DataProvider(hasRowChanged, this.getStableId),
headersIndices: [],
};
this.layoutProvider = new LayoutProvider(
index => {
if (index === 0) {
return ViewTypes.COMPONENT_HEADER;
}
if (this.state.headersIndices.includes(index)) {
return ViewTypes.HEADER;
}
if (this.state.headersIndices.includes(index + 1)) {
return ViewTypes.FOOTER;
}
return ViewTypes.ROW;
},
(type, dim) => {