Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #1

Open
wants to merge 70 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
f7002a8
use nes endpoint to login user
kpose Oct 9, 2022
bd0a157
add app storage keys
kpose Oct 10, 2022
08df383
log user in nd save auth token
kpose Oct 10, 2022
8b00846
sign up user using new api
kpose Oct 10, 2022
d312a80
UserProvider is no longer required
kpose Oct 10, 2022
792fb29
upload document to mongo and s3
kpose Oct 10, 2022
337f2f5
update file viewer provider
kpose Oct 12, 2022
c25c9c9
clean up fileuploadprovider
kpose Oct 12, 2022
117d651
get typed resonse from api call
kpose Oct 12, 2022
fcc29a5
get extracted book data
kpose Oct 18, 2022
899d981
save book metadata to redux
kpose Oct 18, 2022
7ca945b
render uploaded books
kpose Oct 18, 2022
6188859
add pdf book thumbnail
kpose Oct 18, 2022
3483492
disable FAB button when extracting text from pdf
kpose Oct 19, 2022
16d8d05
update..
kpose Oct 21, 2022
850070d
updte
kpose Oct 21, 2022
85e1db0
update local storage on mount if necessary
kpose Oct 26, 2022
9f9ec16
render user books on mount
kpose Oct 26, 2022
c5e6d9d
render saved docs
kpose Oct 29, 2022
b00d438
navigate authenticated users to home screen
kpose Oct 29, 2022
0536948
remove home screen and search screen nav
kpose Oct 29, 2022
590bd60
rewrite screen components and navigation
kpose Oct 29, 2022
d180cec
handle uploaded items
kpose Oct 29, 2022
654fc06
render bottom sheet when item clicked
kpose Oct 29, 2022
bf6fa38
add bottom sheet modal to display reading or listening options
kpose Oct 29, 2022
1e6edd6
rewrite navigation logic
kpose Oct 30, 2022
7199036
add dynamic background to bottom control panel
kpose Oct 30, 2022
ccb88cc
render bottom panel controls
kpose Oct 30, 2022
78bfae5
change control svg icons
kpose Oct 30, 2022
9395d1b
render document texts in pages
kpose Oct 31, 2022
0bea7af
use touchable opacity for controls
kpose Oct 31, 2022
062eb85
add line height to speach text component
kpose Oct 31, 2022
bcff364
save users' last read page and continue reading from there
kpose Nov 2, 2022
27e027d
stash
kpose Nov 4, 2022
8a3edf6
disable speachtext if not reading specific text
kpose Nov 4, 2022
bc41a26
remove redundant log messages
kpose Nov 7, 2022
4daaee8
resume listening from last page
kpose Nov 7, 2022
8cefcb0
play and pause reading
kpose Nov 7, 2022
e8815aa
animate pause button
kpose Nov 8, 2022
baa4817
scroll to last listened page when opening book
kpose Nov 8, 2022
64fda7c
add close button and render oe page per screen
kpose Nov 8, 2022
3ada570
add close icon and pause reading before closing doc
kpose Nov 8, 2022
bff0bed
users can open modal to select prefered voice
kpose Nov 9, 2022
06aec23
use checkmake icon to show currently selected voice
kpose Nov 10, 2022
da37f26
users can select a preferred voice
kpose Nov 10, 2022
a3c074d
Add a heptic feedback when speaker button is pressed
kpose Nov 10, 2022
121fe33
users can select voice based on speakers accent
kpose Nov 10, 2022
bfa3349
persist user's selected default voice
kpose Nov 10, 2022
a5e8c7b
let users know when their library is empty
kpose Nov 11, 2022
855d379
(wip): let users know their doc is being processed/uploaded
kpose Nov 11, 2022
e8547d9
users can delete uploaded books
kpose Nov 14, 2022
29119d4
stop speach when floating button clicked
kpose Nov 14, 2022
7ce28e8
give visual feedback when uploading doc
kpose Nov 14, 2022
03dcada
add redux flipper integration to project
kpose Nov 15, 2022
dd72477
show visual feedback when deleting uploaded documents
kpose Nov 15, 2022
357ed9c
uploaded documents should have a thumbnail
kpose Nov 19, 2022
6956c4a
use fastimage to load thumbnails
kpose Nov 19, 2022
c710c89
correctly render uploaed pdf's
kpose Nov 19, 2022
f05bcea
handle default current reading page
kpose Nov 19, 2022
4fd1899
refresh update deps
KposeFLW May 19, 2023
29f1d5a
update packages
KposeFLW May 19, 2023
de86896
use touchableopacity for read and listen buttons
KposeFLW May 19, 2023
fa44d3a
truncate title text
KposeFLW May 19, 2023
d6911a6
Users should decide if they want to restart reading or continue readi…
KposeFLW May 23, 2023
fc5624c
add custom component to dispay when updating library
KposeFLW May 28, 2023
da68f15
modify app navigator structure
KposeFLW May 28, 2023
cf679dc
tracking file deleting progress
KposeFLW May 28, 2023
d1aa763
cleanup
KposeFLW May 28, 2023
f26b737
clean up document upload
KposeFLW Jun 3, 2023
1cc1d01
in progress
KposeFLW Aug 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add close button and render oe page per screen
  • Loading branch information
kpose committed Nov 8, 2022
commit 64fda7cb23435f6a4aeaf4efd8b0bc36cbc786e8
2 changes: 1 addition & 1 deletion src/providers/SpeachProvider.tsx
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ export const SpeachProvider: FC<ISpeachProviderProps> = ({children}) => {
const [isReading, setIsReading] = useState(false);
const [isFinishedReading, setIsFinishedReading] = useState(false);
const [isPaused, setIsPaused] = useState(false);
const [speachRate, setSpeachRate] = useState<number>(1);
const [speachRate, setSpeachRate] = useState<number>(0.5);
const [speachPitch, setSpeachPitch] = useState<number>(1);
const [currentWord, setcurrentWord] = useState<ISpeachCurrentWordProps>();

20 changes: 15 additions & 5 deletions src/screens/ListenScreen/ListenScreen.tsx
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ import {
FlatList,
ListRenderItem,
useWindowDimensions,
Pressable,
} from 'react-native';
import React, {useCallback, useEffect, useRef, useState} from 'react';
import {IListenScreenProps} from './interfaces';
@@ -27,7 +28,7 @@ const ListenScreen = ({navigation, route}: IListenScreenProps) => {
const [doc, setDoc] = useState<IPDFBook>();
const [isReadingChapter, setIsReadingChapter] = useState(false);
const ITEM_HEIGHT = 65;
const {height} = useWindowDimensions();
const {height, width} = useWindowDimensions();
const {startSpeach, isReading, isFinishedReading, pauseSpeach, isPaused} =
useSpeach();
const flatListRef = useRef<FlatList>(null);
@@ -45,7 +46,6 @@ const ListenScreen = ({navigation, route}: IListenScreenProps) => {

if (flatListRef.current && book?.listening.currentPage) {
let currentPage = book?.listening.currentPage;
console.log(currentPage);
setTimeout(
() =>
flatListRef.current.scrollToIndex({
@@ -64,7 +64,6 @@ const ListenScreen = ({navigation, route}: IListenScreenProps) => {
}
const book = doc.bookData;
const curretPage = doc.listening.currentPage;
console.log(curretPage);

startSpeach(book[curretPage].text);
}, [doc, startSpeach]);
@@ -114,7 +113,8 @@ const ListenScreen = ({navigation, route}: IListenScreenProps) => {
};
const renderDocContent: ListRenderItem<IPDFBookData> = ({item}) => {
return (
<View style={[styles.docContentContainer, {height: height / 1.3}]}>
<View
style={[styles.docContentContainer, {height: height, width: width}]}>
<Text weight="bold" style={styles.pageNumber}>
{'Page: '}
{item.pageNumber}
@@ -127,13 +127,19 @@ const ListenScreen = ({navigation, route}: IListenScreenProps) => {
<SafeAreaView style={styles.container}>
{/* reader chapters*/}
<View style={styles.readerContainer}>
{/* close button/text */}
<Pressable onPress={() => navigation.goBack()}>
<Text style={styles.closeButton}>Close</Text>
</Pressable>

<ScreenTitle style={styles.title}>
{doc?.title.split('.pdf')}
</ScreenTitle>

<FlatList
ref={flatListRef}
data={doc?.bookData}
contentContainerStyle={{flexGrow: 1}}
renderItem={renderDocContent}
keyExtractor={keyExtractor}
getItemLayout={getItemLayout}
@@ -156,7 +162,7 @@ const styles = StyleSheet.create({
flex: 1,
},
docContentContainer: {
flex: 1,
// flex: 1,
},

pageNumber: {
@@ -171,6 +177,10 @@ const styles = StyleSheet.create({
marginVertical: 30,
},

closeButton: {
marginBottom: 10,
},

readerContainer: {
marginTop: 10,
marginHorizontal: 7,