diff --git a/components/FetchedDataSectionList.js b/components/FetchedDataSectionList.js index eee9c50..776b28f 100644 --- a/components/FetchedDataSectionList.js +++ b/components/FetchedDataSectionList.js @@ -2,9 +2,9 @@ import * as React from 'react'; import WebDataManager from "../utils/WebDataManager"; -import {Container, Content, Tab, TabHeading, Tabs, Text} from "native-base"; +import {Container, Tab, TabHeading, Tabs, Text} from "native-base"; import CustomHeader from "./CustomHeader"; -import {RefreshControl, SectionList, View, TouchableHighlight} from "react-native"; +import {RefreshControl, SectionList, View} from "react-native"; import CustomMaterialIcon from "./CustomMaterialIcon"; type Props = { @@ -42,10 +42,6 @@ export default class FetchedDataSectionList extends React.Component) { let tabbedView = []; for (let i = 0; i < dataset.length; i++) { - tabbedView.push( + tabbedView.push( {dataset[i].title} } - key={dataset[i].title}> - - {this.getSectionList( - [ - { - title: dataset[i].title, - data: dataset[i].data, - extraData: dataset[i].extraData, - keyExtractor: dataset[i].keyExtractor - } - ] - )} - + key={dataset[i].title}> + {this.getSectionList( + [ + { + title: dataset[i].title, + data: dataset[i].data, + extraData: dataset[i].extraData, + keyExtractor: dataset[i].keyExtractor + } + ] + )} ); } return tabbedView; @@ -149,9 +142,7 @@ export default class FetchedDataSectionList extends React.Component : - - {this.getSectionList(dataset)} - + this.getSectionList(dataset) } ); diff --git a/screens/HomeScreen.js b/screens/HomeScreen.js index 3d28821..51fda41 100644 --- a/screens/HomeScreen.js +++ b/screens/HomeScreen.js @@ -34,8 +34,8 @@ export default class HomeScreen extends FetchedDataSectionList { return i18n.t("screens.home"); } - shouldShowUpdateToast(): boolean { - return false; + getUpdateToastTranslations() { + return [i18n.t("homeScreen.listUpdated"), i18n.t("homeScreen.listUpdateFail")]; } getKeyExtractor(item: Object) { @@ -68,7 +68,11 @@ export default class HomeScreen extends FetchedDataSectionList { getRenderItem(item: Object, section: Object, data: Object) { return ( - + diff --git a/screens/ProxiwashScreen.js b/screens/ProxiwashScreen.js index 0c9664b..c3d1d5b 100644 --- a/screens/ProxiwashScreen.js +++ b/screens/ProxiwashScreen.js @@ -286,7 +286,9 @@ export default class ProxiwashScreen extends FetchedDataSectionList { return (