File tree Expand file tree Collapse file tree
apps/mobile/src/features/settings/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ function OfferedAppSignIn(props: {
8686 definition = { props . definition }
8787 appSignIn = { props . appSignIn }
8888 disabled = { props . disabled }
89+ onChanged = { discovery . refresh }
8990 />
9091 </ SettingsSection >
9192 ) ;
@@ -97,6 +98,7 @@ function AppSignInRow(props: {
9798 readonly definition : SourceControlDefinition ;
9899 readonly appSignIn : SourceControlAppSignIn ;
99100 readonly disabled : boolean ;
101+ readonly onChanged : ( ) => void ;
100102} ) {
101103 const { environment, definition, appSignIn } = props ;
102104 const environmentId = environment . environmentId ;
@@ -155,11 +157,13 @@ function AppSignInRow(props: {
155157 setPending ( null ) ;
156158 if ( finished . _tag !== "Success" ) {
157159 Alert . alert ( "Sign-in did not finish" , failureMessage ( finished . cause ) ) ;
160+ } else {
161+ props . onChanged ( ) ;
158162 }
159163 } ;
160164
161- const signOut = ( ) =>
162- void updateSettings ( {
165+ const signOut = async ( ) => {
166+ const result = await updateSettings ( {
163167 environmentId,
164168 // Send the whole map; other hosts' redaction markers preserve their sessions.
165169 input : {
@@ -168,6 +172,8 @@ function AppSignInRow(props: {
168172 } ,
169173 } ,
170174 } ) ;
175+ if ( result . _tag === "Success" ) props . onChanged ( ) ;
176+ } ;
171177
172178 const onPress = ( ) => {
173179 if ( signedIn ) {
You can’t perform that action at this time.
0 commit comments