diff options
Diffstat (limited to 'src/view/screens')
-rw-r--r-- | src/view/screens/Home.tsx | 5 | ||||
-rw-r--r-- | src/view/screens/Notifications.tsx | 5 | ||||
-rw-r--r-- | src/view/screens/Profile.tsx | 5 |
3 files changed, 2 insertions, 13 deletions
diff --git a/src/view/screens/Home.tsx b/src/view/screens/Home.tsx index 609b1ca38..8dd7ca411 100644 --- a/src/view/screens/Home.tsx +++ b/src/view/screens/Home.tsx @@ -5,7 +5,6 @@ import useAppState from 'react-native-appstate-hook' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import {ViewHeader} from '../com/util/ViewHeader' import {Feed} from '../com/posts/Feed' -import {FAB} from '../com/util/FloatingActionButton' import {useStores} from '../../state' import {FeedModel} from '../../state/models/feed-view' import {ScreenParams} from '../routes' @@ -65,7 +64,7 @@ export const Home = observer(function Home({ } }, [visible, store]) - const onComposePress = () => { + const onPressCompose = () => { store.shell.openComposer({onPost: onCreatePost}) } const onCreatePost = () => { @@ -87,6 +86,7 @@ export const Home = observer(function Home({ feed={defaultFeedView} scrollElRef={scrollElRef} style={{flex: 1}} + onPressCompose={onPressCompose} onPressTryAgain={onPressTryAgain} /> {defaultFeedView.hasNewLatest ? ( @@ -95,7 +95,6 @@ export const Home = observer(function Home({ <Text style={styles.loadLatestText}>Load new posts</Text> </TouchableOpacity> ) : undefined} - <FAB icon="pen-nib" onPress={onComposePress} /> </View> ) }) diff --git a/src/view/screens/Notifications.tsx b/src/view/screens/Notifications.tsx index 7e4de497e..1e7abdb90 100644 --- a/src/view/screens/Notifications.tsx +++ b/src/view/screens/Notifications.tsx @@ -1,7 +1,6 @@ import React, {useState, useEffect} from 'react' import {View} from 'react-native' import {ViewHeader} from '../com/util/ViewHeader' -import {FAB} from '../com/util/FloatingActionButton' import {Feed} from '../com/notifications/Feed' import {useStores} from '../../state' import {NotificationsViewModel} from '../../state/models/notifications-view' @@ -37,9 +36,6 @@ export const Notifications = ({navIdx, visible}: ScreenParams) => { } }, [visible, store]) - const onComposePress = () => { - store.shell.openComposer({}) - } const onPressTryAgain = () => { notesView?.refresh() } @@ -48,7 +44,6 @@ export const Notifications = ({navIdx, visible}: ScreenParams) => { <View style={{flex: 1}}> <ViewHeader title="Notifications" /> {notesView && <Feed view={notesView} onPressTryAgain={onPressTryAgain} />} - <FAB icon="pen-nib" onPress={onComposePress} /> </View> ) } diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx index e637c6ad8..1187e626e 100644 --- a/src/view/screens/Profile.tsx +++ b/src/view/screens/Profile.tsx @@ -3,7 +3,6 @@ import {StyleSheet, Text, View} from 'react-native' import {observer} from 'mobx-react-lite' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import {ViewSelector} from '../com/util/ViewSelector' -import {FAB} from '../com/util/FloatingActionButton' import {ScreenParams} from '../routes' import {ProfileUiModel, Sections} from '../../state/models/profile-ui' import {MembershipItem} from '../../state/models/memberships-view' @@ -86,9 +85,6 @@ export const Profile = observer(({navIdx, visible, params}: ScreenParams) => { ), ) } - const onComposePress = () => { - store.shell.openComposer({}) - } // rendering // = @@ -241,7 +237,6 @@ export const Profile = observer(({navIdx, visible, params}: ScreenParams) => { ) : ( renderHeader() )} - <FAB icon="pen-nib" onPress={onComposePress} /> </View> ) }) |