Skip to content

Commit

Permalink
Fixes xamarin#807 Put TrySetResult (xamarin#829)
Browse files Browse the repository at this point in the history
* Put TrySetResult

* Update Samples/Samples/View/LauncherPage.xaml
  • Loading branch information
jamesmontemagno authored Jun 29, 2019
1 parent 05ba079 commit 0e310c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Samples/Samples/View/LauncherPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Entry Grid.Row="0" Grid.ColumnSpan="2" Text="{Binding LaunchUri}" />
<Button Grid.Row="1" Grid.ColumnSpan="2" Text="Check Launch" Command="{Binding CanLaunchCommand}"/>
<Button Grid.Row="1" Text="Check Launch" Command="{Binding CanLaunchCommand}"/>
<Button Grid.Row="1" Grid.Column="1" Text=" Launch" Command="{Binding LaunchCommand}"/>
<Button Grid.Row="2" Grid.Column="0" Text="Launch Browser" Command="{Binding LaunchBrowserCommand}"/>
<Button Grid.Row="2" Grid.Column="1" Text="Launch Mail" Command="{Binding LaunchMailCommand}"/>

Expand All @@ -41,4 +42,4 @@
</Grid>
</ScrollView>
</StackLayout>
</views:BasePage>
</views:BasePage>
2 changes: 1 addition & 1 deletion Xamarin.Essentials/Sms/Sms.ios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static Task PlatformComposeAsync(SmsMessage message)
messageController.Finished += (sender, e) =>
{
messageController.DismissViewController(true, null);
tcs.SetResult(e.Result == MessageComposeResult.Sent);
tcs?.TrySetResult(e.Result == MessageComposeResult.Sent);
};
controller.PresentViewController(messageController, true, null);

Expand Down

0 comments on commit 0e310c1

Please sign in to comment.