File tree Expand file tree Collapse file tree 2 files changed +13
-21
lines changed Expand file tree Collapse file tree 2 files changed +13
-21
lines changed Original file line number Diff line number Diff line change 175175 </controls : HeaderedControl >
176176
177177 <controls : HeaderedControl >
178- <controls : SettingsButton Content =" Bridge debug "
179- Click =" Bridge_Click " />
178+ <controls : SettingsButton Content =" Generate exception "
179+ Click =" Exception_Click " />
180180 <controls : SettingsButton Content =" Crash the app ☠ "
181181 Click =" Crash_Click" />
182+ <controls : SettingsButton Content =" Crash TDLib ☠ "
183+ Click =" Logger_Click" />
182184 </controls : HeaderedControl >
183185 </controls : SettingsPanel >
184186 </ScrollViewer >
Original file line number Diff line number Diff line change 88using Telegram . Common ;
99using Telegram . Converters ;
1010using Telegram . Native ;
11+ using Telegram . Td ;
12+ using Telegram . Td . Api ;
1113using Telegram . ViewModels ;
1214using Windows . UI . Xaml ;
1315using Windows . UI . Xaml . Hosting ;
@@ -38,31 +40,19 @@ private string ConvertSize(ulong size)
3840
3941 #endregion
4042
41- private void Crash_Click ( object sender , RoutedEventArgs e )
43+ private void Exception_Click ( object sender , RoutedEventArgs e )
4244 {
43- NativeUtils . Crash ( ) ;
44- return ;
45-
4645 ElementCompositionPreview . GetElementVisual ( null ) ;
47- return ;
48-
49- if ( sender is FrameworkElement element )
50- {
51- element . SizeChanged += ( s , args ) =>
52- {
53- element . Height ++ ;
54- } ;
55-
56- element . Height = element . ActualHeight + 1 ;
57- }
5846 }
5947
60- private void Bridge_Click ( object sender , RoutedEventArgs e )
48+ private void Crash_Click ( object sender , RoutedEventArgs e )
6149 {
62- ElementCompositionPreview . GetElementVisual ( null ) ;
63- return ;
50+ NativeUtils . Crash ( ) ;
51+ }
6452
65- NotifyIcon . Debug ( "Message received" ) ;
53+ private void Logger_Click ( object sender , RoutedEventArgs e )
54+ {
55+ Client . Execute ( new AddLogMessage ( 0 , "This should produce a stack trace" ) ) ;
6656 }
6757 }
6858}
You can’t perform that action at this time.
0 commit comments