mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-24 10:32:46 +02:00
Widgets: Make sure we have a scalar token before opening one (#1723).
Make the build of the true widget URL asynchronous and build it only when necessary.
This commit is contained in:
@@ -66,8 +66,16 @@
|
||||
mxkViewController.navigationItem.backBarButtonItem =[[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
|
||||
|
||||
// Display the widget
|
||||
WidgetViewController *widgetVC = [[WidgetViewController alloc] initForWidget:widget];
|
||||
[mxkViewController.navigationController pushViewController:widgetVC animated:YES];
|
||||
[widget widgetUrl:^(NSString * _Nonnull widgetUrl) {
|
||||
|
||||
WidgetViewController *widgetVC = [[WidgetViewController alloc] initWithUrl:widgetUrl forWidget:widget];
|
||||
[mxkViewController.navigationController pushViewController:widgetVC animated:YES];
|
||||
|
||||
} failure:^(NSError * _Nonnull error) {
|
||||
|
||||
NSLog(@"[WidgetPickerVC] Cannot display widget %@", widget);
|
||||
[[AppDelegate theDelegate] showErrorAsAlert:error];
|
||||
}];
|
||||
}];
|
||||
[_alertController addAction:alertAction];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user