Removed console.log and changed tab colors

This commit is contained in:
keplyx 2020-03-08 00:33:08 +01:00
parent 97a56a5245
commit 60a8fedb48
5 changed files with 7 additions and 10 deletions

1
App.js
View file

@ -107,7 +107,6 @@ export default class App extends React.Component<Props, State> {
* Renders the app based on loading state
*/
render() {
console.log("render");
if (this.state.isLoading) {
return null;
} else if (this.state.showIntro || this.state.showUpdate) {

View file

@ -141,7 +141,6 @@ export default class SideBar extends React.Component<Props, State> {
getRenderItem({item}: Object) {
console.log("rendering SideBar Item");
const onListItemPress = this.onListItemPress.bind(this, item);
if (item.icon !== undefined) {
return (
@ -160,7 +159,6 @@ export default class SideBar extends React.Component<Props, State> {
}
render() {
console.log("rendering SideBar");
return (
<View style={{height: '100%'}}>
<Image source={require("../assets/drawer-cover.png")} style={styles.drawerCover}/>

View file

@ -12,9 +12,9 @@ import ProximoListScreen from "../screens/Proximo/ProximoListScreen";
import ProximoAboutScreen from "../screens/Proximo/ProximoAboutScreen";
import PlanexScreen from '../screens/Websites/PlanexScreen';
import {MaterialCommunityIcons} from "@expo/vector-icons";
import ThemeManager from "../utils/ThemeManager";
import AsyncStorageManager from "../utils/AsyncStorageManager";
import HeaderButton from "../components/HeaderButton";
import {withTheme} from 'react-native-paper';
const TAB_ICONS = {
Home: 'triangle',
@ -197,16 +197,17 @@ function PlanexStackComponent() {
const Tab = createMaterialBottomTabNavigator();
export default function TabNavigator() {
function TabNavigator(props) {
const {colors} = props.theme;
return (
<Tab.Navigator
initialRouteName={AsyncStorageManager.getInstance().preferences.defaultStartScreen.current}
barStyle={{backgroundColor: ThemeManager.getCurrentThemeVariables().primary}}
barStyle={{backgroundColor: colors.surface}}
screenOptions={({route}) => ({
tabBarIcon: ({focused, color, size}) => {
let icon = TAB_ICONS[route.name];
// tintColor is ignoring activeColor and inactiveColor for some reason
color = focused ? "#f0edf6" : "#4e1108";
color = focused ? colors.text : colors.textDisabled;
return <MaterialCommunityIcons name={icon} color={color} size={26}/>;
},
})}
@ -234,3 +235,5 @@ export default function TabNavigator() {
</Tab.Navigator>
);
}
export default withTheme(TabNavigator);

View file

@ -266,7 +266,6 @@ export default class AboutScreen extends React.Component<Props, State> {
*/
getCardItem({item}: Object) {
let shouldShow = !item.showOnlyInDebug || (item.showOnlyInDebug && this.state.isDebugUnlocked);
console.log(item.text);
if (shouldShow) {
if (item.showChevron) {
return (

View file

@ -199,7 +199,6 @@ export default class ProximoListScreen extends React.Component<Props, State> {
}
getModalSortMenu() {
console.log(this.state.currentSortMode);
return (
<View style={{
flex: 1,
@ -299,7 +298,6 @@ export default class ProximoListScreen extends React.Component<Props, State> {
}
render() {
console.log("rendering ProximoListScreen");
return (
<View style={{
height: '100%'