about summary refs log tree commit diff
path: root/src/view
diff options
context:
space:
mode:
Diffstat (limited to 'src/view')
-rw-r--r--src/view/screens/Notifications.tsx5
-rw-r--r--src/view/screens/Profile.tsx5
-rw-r--r--src/view/screens/Search.tsx5
3 files changed, 15 insertions, 0 deletions
diff --git a/src/view/screens/Notifications.tsx b/src/view/screens/Notifications.tsx
index f1084540c..71eda34de 100644
--- a/src/view/screens/Notifications.tsx
+++ b/src/view/screens/Notifications.tsx
@@ -1,6 +1,7 @@
 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'
@@ -36,6 +37,9 @@ export const Notifications = ({visible}: ScreenParams) => {
     }
   }, [visible, store])
 
+  const onComposePress = () => {
+    store.shell.openComposer({})
+  }
   const onPressTryAgain = () => {
     notesView?.refresh()
   }
@@ -44,6 +48,7 @@ export const Notifications = ({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 4d792df6a..d3088a4b2 100644
--- a/src/view/screens/Profile.tsx
+++ b/src/view/screens/Profile.tsx
@@ -3,6 +3,7 @@ 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'
@@ -84,6 +85,9 @@ export const Profile = observer(({visible, params}: ScreenParams) => {
       ),
     )
   }
+  const onComposePress = () => {
+    store.shell.openComposer({})
+  }
 
   // rendering
   // =
@@ -235,6 +239,7 @@ export const Profile = observer(({visible, params}: ScreenParams) => {
       ) : (
         renderHeader()
       )}
+      <FAB icon="pen-nib" onPress={onComposePress} />
     </View>
   )
 })
diff --git a/src/view/screens/Search.tsx b/src/view/screens/Search.tsx
index b1c78f681..7f3dd966b 100644
--- a/src/view/screens/Search.tsx
+++ b/src/view/screens/Search.tsx
@@ -1,6 +1,7 @@
 import React, {useEffect} from 'react'
 import {StyleSheet, Text, View} from 'react-native'
 import {ViewHeader} from '../com/util/ViewHeader'
+import {FAB} from '../com/util/FloatingActionButton'
 import {SuggestedFollows} from '../com/discover/SuggestedFollows'
 import {ScreenParams} from '../routes'
 import {useStores} from '../../state'
@@ -15,6 +16,9 @@ export const Search = ({visible, params}: ScreenParams) => {
       store.nav.setTitle(`Search`)
     }
   }, [store, visible, name])
+  const onComposePress = () => {
+    store.shell.openComposer({})
+  }
 
   return (
     <View style={styles.container}>
@@ -26,6 +30,7 @@ export const Search = ({visible, params}: ScreenParams) => {
       </View>
       <Text style={styles.heading}>Suggested follows</Text>
       <SuggestedFollows asLinks />
+      <FAB icon="pen-nib" onPress={onComposePress} />
     </View>
   )
 }