From 43d73e9bd615af02f618b51fa67dcde167e2e4f2 Mon Sep 17 00:00:00 2001 From: keplyx Date: Sun, 28 Jul 2019 12:56:20 +0200 Subject: [PATCH] Remove update toast on home, added tab icons for proxiwash --- components/FetchedDataSectionList.js | 18 ++++++++++++++++-- screens/HomeScreen.js | 4 ++-- screens/ProxiwashScreen.js | 2 ++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/components/FetchedDataSectionList.js b/components/FetchedDataSectionList.js index bbd9972..b42a31a 100644 --- a/components/FetchedDataSectionList.js +++ b/components/FetchedDataSectionList.js @@ -5,6 +5,8 @@ import WebDataManager from "../utils/WebDataManager"; import {Container, Content, Tab, TabHeading, Tabs, Text} from "native-base"; import CustomHeader from "./CustomHeader"; import {RefreshControl, SectionList, View} from "react-native"; +import i18n from "i18n-js"; +import CustomMaterialIcon from "./CustomMaterialIcon"; type Props = { navigation: Object, @@ -45,6 +47,10 @@ export default class FetchedDataSectionList extends React.Component{dataset[i].title}}> + + + {dataset[i].title} + }> {this.getSectionList( [ diff --git a/screens/HomeScreen.js b/screens/HomeScreen.js index eef0918..b699c4f 100644 --- a/screens/HomeScreen.js +++ b/screens/HomeScreen.js @@ -29,8 +29,8 @@ export default class HomeScreen extends FetchedDataSectionList { return i18n.t("screens.home"); } - getUpdateToastTranslations () { - return [i18n.t("homeScreen.listUpdated"),i18n.t("homeScreen.listUpdateFail")]; + shouldShowUpdateToast(): boolean { + return false; } getKeyExtractor(item : Object) { diff --git a/screens/ProxiwashScreen.js b/screens/ProxiwashScreen.js index 97aef8a..7236211 100644 --- a/screens/ProxiwashScreen.js +++ b/screens/ProxiwashScreen.js @@ -193,11 +193,13 @@ export default class ProxiwashScreen extends FetchedDataSectionList { return [ { title: i18n.t('proxiwashScreen.dryers'), + icon: 'tumble-dryer', data: fetchedData.dryers === undefined ? [] : fetchedData.dryers, extraData: super.state }, { title: i18n.t('proxiwashScreen.washers'), + icon: 'washing-machine', data: fetchedData.washers === undefined ? [] : fetchedData.washers, extraData: super.state },