mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
setting status bar style
This commit is contained in:
parent
7799064039
commit
801336d05b
@ -310,7 +310,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
|
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 9;
|
CURRENT_PROJECT_VERSION = 13;
|
||||||
DEVELOPMENT_TEAM = 3P65PQ7SUR;
|
DEVELOPMENT_TEAM = 3P65PQ7SUR;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
@ -348,7 +348,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
|
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 9;
|
CURRENT_PROJECT_VERSION = 13;
|
||||||
DEVELOPMENT_TEAM = 3P65PQ7SUR;
|
DEVELOPMENT_TEAM = 3P65PQ7SUR;
|
||||||
INFOPLIST_FILE = Databag/Info.plist;
|
INFOPLIST_FILE = Databag/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = Databag;
|
INFOPLIST_KEY_CFBundleDisplayName = Databag;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { View, TouchableOpacity, Text } from 'react-native';
|
import { View, StatusBar, TouchableOpacity, Text } from 'react-native';
|
||||||
import { useState, useEffect, useContext } from 'react';
|
import { useState, useEffect, useContext } from 'react';
|
||||||
import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context';
|
import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context';
|
||||||
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
||||||
@ -379,6 +379,7 @@ export function Session() {
|
|||||||
<Tab.Screen name="Contacts" component={ContactStackScreen} />
|
<Tab.Screen name="Contacts" component={ContactStackScreen} />
|
||||||
</Tab.Navigator>
|
</Tab.Navigator>
|
||||||
)}
|
)}
|
||||||
|
<StatusBar barStyle="dark-content" backgroundColor={Colors.background} />
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,8 @@ export function useImageAsset(topicId, asset) {
|
|||||||
frameWidth: 1,
|
frameWidth: 1,
|
||||||
frameHeight: 1,
|
frameHeight: 1,
|
||||||
imageRatio: 1,
|
imageRatio: 1,
|
||||||
imageWidth: 1,
|
imageWidth: 128,
|
||||||
imageHeight: 1,
|
imageHeight: 128,
|
||||||
url: null,
|
url: null,
|
||||||
loaded: false,
|
loaded: false,
|
||||||
failed: false,
|
failed: false,
|
||||||
@ -24,18 +24,20 @@ export function useImageAsset(topicId, asset) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const frameRatio = state.frameWidth / state.frameHeight;
|
if (state.loaded) {
|
||||||
if (frameRatio > state.imageRatio) {
|
const frameRatio = state.frameWidth / state.frameHeight;
|
||||||
//height constrained
|
if (frameRatio > state.imageRatio) {
|
||||||
const height = 0.9 * state.frameHeight;
|
//height constrained
|
||||||
const width = height * state.imageRatio;
|
const height = 0.9 * state.frameHeight;
|
||||||
updateState({ imageWidth: width, imageHeight: height });
|
const width = height * state.imageRatio;
|
||||||
}
|
updateState({ imageWidth: width, imageHeight: height });
|
||||||
else {
|
}
|
||||||
//width constrained
|
else {
|
||||||
const width = 0.9 * state.frameWidth;
|
//width constrained
|
||||||
const height = width / state.imageRatio;
|
const width = 0.9 * state.frameWidth;
|
||||||
updateState({ imageWidth: width, imageHeight: height });
|
const height = width / state.imageRatio;
|
||||||
|
updateState({ imageWidth: width, imageHeight: height });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, [state.frameWidth, state.frameHeight, state.imageRatio]);
|
}, [state.frameWidth, state.frameHeight, state.imageRatio]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user