11import * as React from 'react'
2- import { StyleSheet , SectionList } from 'react-native'
2+ import { StyleSheet , Text , SectionList } from 'react-native'
3+ import restart from 'react-native-restart'
34import * as storage from '../../../lib/storage'
45import { NativeStackNavigationOptions } from '@react-navigation/native-stack'
56import { CellToggle } from '@frogpond/tableview/cells'
@@ -9,6 +10,8 @@ import {AppConfig, FeatureFlagType} from '@frogpond/app-config'
910import { groupBy , orderBy } from 'lodash'
1011import { LoadingView , NoticeView } from '@frogpond/notice'
1112import { toLaxTitleCase } from '@frogpond/titlecase'
13+ import { Touchable } from '@frogpond/touchable'
14+ import { commonStyles } from '../../../../modules/navigation-buttons/styles'
1215
1316export const FeatureFlagsView = ( ) : JSX . Element => {
1417 let [ loading , setLoading ] = React . useState ( true )
@@ -89,4 +92,20 @@ export {FeatureFlagsView as View}
8992
9093export const NavigationOptions : NativeStackNavigationOptions = {
9194 title : 'Feature Flags' ,
95+ headerRight : ( ) => (
96+ < Touchable
97+ accessibilityLabel = "Apply"
98+ accessibilityRole = "button"
99+ accessible = { true }
100+ borderless = { true }
101+ highlight = { false }
102+ onPress = { ( ) => restart . Restart ( ) }
103+ style = { commonStyles . button }
104+ >
105+ { /* eslint-disable-next-line react-native/no-inline-styles */ }
106+ < Text style = { [ commonStyles . text , { fontWeight : '600' , color : c . link } ] } >
107+ Reload
108+ </ Text >
109+ </ Touchable >
110+ ) ,
92111}
0 commit comments