Skip to content

Commit

Permalink
Fix icons and fetch more images at once
Browse files Browse the repository at this point in the history
  • Loading branch information
derneuere committed Jul 22, 2024
1 parent 1546ee1 commit 75e2b37
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 26 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "librephotosmobile",
"version": "1.1.0",
"version": "1.1.1",
"private": true,
"scripts": {
"android": "react-native run-android",
Expand Down
10 changes: 3 additions & 7 deletions src/Components/PreviewTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import { FlatList, View, Pressable } from 'react-native'
import { useSelector } from 'react-redux'
import { Box, Image, Text, HStack } from 'native-base'
import Ionicons from 'react-native-vector-icons/Ionicons'
import Feather from 'react-native-vector-icons/Feather'
import { useTheme } from '@/Theme'
import { useNavigation } from '@react-navigation/native'

Expand Down Expand Up @@ -78,11 +78,7 @@ const PreviewTile = ({
<HStack style={[Gutters.regularLPadding]}>
{icon && (
<View style={[Layout.center]}>
<Ionicons
name={icon + iconSuffix}
size={35}
color={Colors.text}
/>
<Feather name={icon + iconSuffix} size={35} color={Colors.text} />
</View>
)}
<View
Expand All @@ -100,7 +96,7 @@ const PreviewTile = ({
</Text>
</View>
<View style={[Layout.center]}>
<Ionicons name={'chevron-forward'} size={35} color={Colors.text} />
<Feather name={'chevron-right'} size={35} color={Colors.text} />
</View>
</HStack>
</Pressable>
Expand Down
4 changes: 2 additions & 2 deletions src/Containers/Albums/Index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const AlbumContainer = () => {
}
>
<PreviewTile
icon="people"
icon="users"
heading="People"
subHeading={`about ${albumPeople?.length} people`}
albums={albumPeopleMapper(albumPeople)}
Expand All @@ -72,7 +72,7 @@ const AlbumContainer = () => {
albums={albumPeopleMapper(albumPeople)}
/> */}
<PreviewTile
icon="library"
icon="book"
heading="Things"
subHeading={`about ${albumThings?.length} things`}
albums={albumThingsMapper(albumThings)}
Expand Down
6 changes: 3 additions & 3 deletions src/Containers/Login/Index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
FormControl,
Text,
} from 'native-base'
import Ionicons from 'react-native-vector-icons/Ionicons'
import FeatherIcon from 'react-native-vector-icons/Feather'
import { useTranslation } from 'react-i18next'
import { useTheme } from '@/Theme'
import { Brand } from '@/Components'
Expand Down Expand Up @@ -134,14 +134,14 @@ const IndexLoginContainer = () => {
<Spinner color="blue.500" />
) : isValidServer ? (
<Icon
as={<Ionicons name="checkmark" />}
as={<FeatherIcon name="check" />}
size="md"
m={2}
color="green"
/>
) : (
<Icon
as={<Ionicons name="alert-circle-outline" />}
as={<FeatherIcon name="alert-triangle" />}
size="md"
m={2}
color="red"
Expand Down
6 changes: 3 additions & 3 deletions src/Containers/Search/SearchBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
StatusBar,
Center,
} from 'native-base'
import Ionicons from 'react-native-vector-icons/Ionicons'
import Feather from 'react-native-vector-icons/Feather'
import { useTheme } from '@/Theme'
import FindPhotos from '../../Store/Search/FindPhotos'
import UpdateQuery from '../../Store/Search/UpdateQuery'
Expand Down Expand Up @@ -60,7 +60,7 @@ const SearchBar = ({ showMenu = false }) => {
icon={
<Icon
size="sm"
as={<Ionicons name="arrow-back" />}
as={<Feather name="arrow-back" />}
color={Colors.text}
/>
}
Expand All @@ -86,7 +86,7 @@ const SearchBar = ({ showMenu = false }) => {
py={2}
px={2}
InputLeftElement={
<Icon size="md" ml={2} as={<Ionicons name="search" />} />
<Icon size="md" ml={2} as={<Feather name="search" />} />
}
/>
</Center>
Expand Down
8 changes: 2 additions & 6 deletions src/Containers/Search/StartSearch.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import React from 'react'
import { View } from 'react-native'
import { Icon, Text } from 'native-base'
import Ionicon from 'react-native-vector-icons/Ionicons'
import FeatherIcon from 'react-native-vector-icons/Feather'
import { useTheme } from '@/Theme'

const StartSearch = ({ height, width, mode }) => {
const { Common, Colors, Layout, Gutters } = useTheme()

return (
<View style={[Layout.fullSize, Layout.center, Common.backgroundDefault]}>
<Icon
size="3xl"
as={<Ionicon name="flashlight-outline" />}
color={Colors.text}
/>
<Icon size="3xl" as={<FeatherIcon name="search" />} color={Colors.text} />
<Text
color={Colors.textMuted}
textAlign={'center'}
Expand Down
2 changes: 1 addition & 1 deletion src/Containers/Settings/Index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const SettingsContainer = () => {
<View style={[Layout.fill]}>
<SettingSubHeader subHeading={'App'} />
<VStack divider={<Divider bg={Colors.textMuted} />}>
<OptionButton title="Account" subTitle={user?.name} icon="person" />
<OptionButton title="Account" subTitle={user?.name} icon="user" />
<OptionButton title="Server" subTitle={baseurl} />
<OptionMultiSelect
title="Dark Mode"
Expand Down
4 changes: 2 additions & 2 deletions src/Containers/Settings/SettingItem.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { View, Text, HStack, VStack, Switch } from 'native-base'
import { useTheme } from '@/Theme'
import Ionicons from 'react-native-vector-icons/Ionicons'
import Feather from 'react-native-vector-icons/Feather'

export const SettingItem = ({
title,
Expand All @@ -19,7 +19,7 @@ export const SettingItem = ({
<HStack space={3}>
{icon && (
<View flex={0.15} style={[Gutters.tinyHMargin, Layout.center]}>
<Ionicons name={icon} size={35} color={Colors.text} />
<Feather name={icon} size={35} color={Colors.text} />
</View>
)}

Expand Down
2 changes: 2 additions & 0 deletions src/Services/Config/CheckServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import axios from 'axios'

export default async serverName => {
// TODO: Create a dedicated endpoint to test connection
console.log('Checking server...')
console.log('Server:', serverName)
const server = serverName
const res = await axios
.post(
Expand Down
2 changes: 1 addition & 1 deletion src/Store/LocalImages/LocalImagesSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const loadLocalImages = createAsyncThunk(
// load images from CameraRoll
while (page_info.has_next_page && !page_info.no_valid_photos) {
page_info = await CameraRoll.getPhotos({
first: 100,
first: 1000,
after: page_info.end_cursor,
// only load images that are newer than the last fetch
// To-Do: This broken somehow
Expand Down

0 comments on commit 75e2b37

Please sign in to comment.