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:
manuroe
2018-01-04 11:49:39 +01:00
parent 78d19e7334
commit 83a51295aa
10 changed files with 125 additions and 82 deletions
@@ -25,9 +25,9 @@
@implementation WidgetViewController
- (instancetype)initForWidget:(Widget*)theWidget
- (instancetype)initWithUrl:(NSString*)widgetUrl forWidget:(Widget*)theWidget
{
self = [super initWithURL:theWidget.url];
self = [super initWithURL:widgetUrl];
if (self)
{
widget = theWidget;