esoftplay 0.0.124-x → 0.0.124-y

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  // noPage
2
-
2
+ import { FlashList } from "@shopify/flash-list";
3
3
  import { LibComponent } from 'esoftplay/cache/lib/component/import';
4
4
  import { LibCurl } from 'esoftplay/cache/lib/curl/import';
5
5
  import { LibListItemLayout } from 'esoftplay/cache/lib/list/import';
@@ -10,7 +10,7 @@ import esp from 'esoftplay/esp';
10
10
 
11
11
  import React from 'react';
12
12
  import isEqual from 'react-fast-compare';
13
- import { FlatList, View } from 'react-native';
13
+ import { View } from 'react-native';
14
14
 
15
15
  export interface LibInfiniteProps {
16
16
  url: string,
@@ -66,7 +66,7 @@ export default class m extends LibComponent<LibInfiniteProps, LibInfiniteState>{
66
66
  isStop: boolean = false
67
67
  page: number | undefined = 0
68
68
  pages: number[]
69
- flatlist = React.createRef<FlatList<View>>()
69
+ flatlist = React.createRef<FlashList<View>>()
70
70
 
71
71
  constructor(props: LibInfiniteProps) {
72
72
  super(props);
@@ -179,7 +179,7 @@ export default class m extends LibComponent<LibInfiniteProps, LibInfiniteState>{
179
179
  const { data, error } = this.state
180
180
  const { errorView, refreshEnabled } = this.props
181
181
  // const AutoLayoutViewNativeComponent = require("@shopify/flash-list/src/native/auto-layout/AutoLayoutViewNativeComponent")
182
- const List = /* !!AutoLayoutViewNativeComponent ? FlashList : */ FlatList
182
+ const List = /* !!AutoLayoutViewNativeComponent ? FlashList : */ FlashList
183
183
  return (
184
184
  <View style={{ flex: 1 }} >
185
185
  {
@@ -205,6 +205,7 @@ export default class m extends LibComponent<LibInfiniteProps, LibInfiniteState>{
205
205
  }
206
206
  showsHorizontalScrollIndicator={false}
207
207
  showsVerticalScrollIndicator={false}
208
+ estimatedItemSize={this.props.staticHeight || 100}
208
209
  initialNumToRender={5}
209
210
  maxToRenderPerBatch={10}
210
211
  windowSize={10}
@@ -2,9 +2,10 @@
2
2
 
3
3
 
4
4
  //
5
+ import { FlashList } from "@shopify/flash-list";
5
6
  import { LibComponent } from 'esoftplay/cache/lib/component/import';
6
7
  import React from "react";
7
- import { FlatList, View } from 'react-native';
8
+ import { View } from 'react-native';
8
9
 
9
10
  export interface LibListItemLayout {
10
11
  length: number,
@@ -50,7 +51,7 @@ export interface LibListState {
50
51
  export default class m extends LibComponent<LibListProps, LibListState> {
51
52
 
52
53
  view: any = React.createRef()
53
- flatlist = React.createRef<FlatList<View>>()
54
+ flatlist = React.createRef<FlashList<View>>()
54
55
  constructor(props: LibListProps) {
55
56
  super(props);
56
57
  this.scrollToIndex = this.scrollToIndex.bind(this);
@@ -77,7 +78,7 @@ export default class m extends LibComponent<LibListProps, LibListState> {
77
78
  return ({ getItemLayout: (data, index) => this.props.staticHeight ? ({ length: this.props.staticHeight, offset: this.props.staticHeight, index: index }) : undefined })
78
79
  }
79
80
  // const AutoLayoutViewNativeComponent = require("@shopify/flash-list/src/native/auto-layout/AutoLayoutViewNativeComponent")
80
- const List = /* !!AutoLayoutViewNativeComponent ? FlashList : */ FlatList
81
+ const List = /* !!AutoLayoutViewNativeComponent ? FlashList : */ FlashList
81
82
  return (
82
83
  <View ref={(e) => this.view = e} style={[{ flex: 1 }]} >
83
84
  <List
@@ -89,6 +90,7 @@ export default class m extends LibComponent<LibListProps, LibListState> {
89
90
  refreshing={false}
90
91
  nestedScrollEnabled
91
92
  initialNumToRender={5}
93
+ estimatedItemSize={this.props.staticHeight || 100}
92
94
  maxToRenderPerBatch={10}
93
95
  windowSize={10}
94
96
  {...this.props}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.124-x",
3
+ "version": "0.0.124-y",
4
4
  "description": "embedding data from esoftplay framework (web based) into mobile app",
5
5
  "main": "cache/index.js",
6
6
  "types": "../../index.d.ts",