|
@@ -5,6 +5,8 @@ import WebDataManager from "../utils/WebDataManager";
|
5
|
5
|
import {Container, Content, Tab, TabHeading, Tabs, Text} from "native-base";
|
6
|
6
|
import CustomHeader from "./CustomHeader";
|
7
|
7
|
import {RefreshControl, SectionList, View} from "react-native";
|
|
8
|
+import i18n from "i18n-js";
|
|
9
|
+import CustomMaterialIcon from "./CustomMaterialIcon";
|
8
|
10
|
|
9
|
11
|
type Props = {
|
10
|
12
|
navigation: Object,
|
|
@@ -45,6 +47,10 @@ export default class FetchedDataSectionList extends React.Component<Props, State
|
45
|
47
|
return ["whoa", "nah"];
|
46
|
48
|
}
|
47
|
49
|
|
|
50
|
+ shouldShowUpdateToast() {
|
|
51
|
+ return true;
|
|
52
|
+ }
|
|
53
|
+
|
48
|
54
|
/**
|
49
|
55
|
* Refresh the FetchedData on first screen load
|
50
|
56
|
*/
|
|
@@ -60,7 +66,8 @@ export default class FetchedDataSectionList extends React.Component<Props, State
|
60
|
66
|
refreshing: false,
|
61
|
67
|
firstLoading: false
|
62
|
68
|
});
|
63
|
|
- this.webDataManager.showUpdateToast(this.getUpdateToastTranslations()[0], this.getUpdateToastTranslations()[1]);
|
|
69
|
+ if (this.shouldShowUpdateToast())
|
|
70
|
+ this.webDataManager.showUpdateToast(this.getUpdateToastTranslations()[0], this.getUpdateToastTranslations()[1]);
|
64
|
71
|
});
|
65
|
72
|
};
|
66
|
73
|
|
|
@@ -120,7 +127,14 @@ export default class FetchedDataSectionList extends React.Component<Props, State
|
120
|
127
|
let tabbedView = [];
|
121
|
128
|
for (let i = 0; i < dataset.length; i++) {
|
122
|
129
|
tabbedView.push(
|
123
|
|
- <Tab heading={<TabHeading><Text>{dataset[i].title}</Text></TabHeading>}>
|
|
130
|
+ <Tab heading={
|
|
131
|
+ <TabHeading>
|
|
132
|
+ <CustomMaterialIcon icon={dataset[i].icon}
|
|
133
|
+ color={'#fff'}
|
|
134
|
+ fontSize={20}
|
|
135
|
+ />
|
|
136
|
+ <Text>{dataset[i].title}</Text>
|
|
137
|
+ </TabHeading>}>
|
124
|
138
|
<Content padder>
|
125
|
139
|
{this.getSectionList(
|
126
|
140
|
[
|