blob: f6ceca2373f711600f4a46c9cb2ce9e6a39e7469 [file] [log] [blame]
Alexandre Lision8521baa2015-03-13 11:08:00 -04001/*
Alexandre Lision9fe374b2016-01-06 10:17:31 -05002 * Copyright (C) 2015-2016 Savoir-faire Linux Inc.
Alexandre Lision8521baa2015-03-13 11:08:00 -04003 * Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Alexandre Lision8521baa2015-03-13 11:08:00 -040018 */
Alexandre Lision5855b6a2015-02-03 11:31:05 -050019#import "RingWindowController.h"
Alexandre Lision0f66bd32016-01-18 11:30:45 -050020#import <QuartzCore/QuartzCore.h>
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -040021#include <qrencode.h>
Alexandre Lision0f66bd32016-01-18 11:30:45 -050022
23//Qt
24#import <QItemSelectionModel>
25#import <QItemSelection>
Alexandre Lision5855b6a2015-02-03 11:31:05 -050026
Alexandre Lisionbb5c2462015-07-30 12:55:37 -040027//LRC
Alexandre Lision5855b6a2015-02-03 11:31:05 -050028#import <accountmodel.h>
29#import <callmodel.h>
30#import <account.h>
Alexandre Lision91d11e52015-03-20 17:42:05 -040031#import <call.h>
Alexandre Lision0f66bd32016-01-18 11:30:45 -050032#import <recentmodel.h>
Kateryna Kostiuk312f9132017-04-18 12:09:06 -040033#import <AvailableAccountModel.h>
34
Alexandre Lision5855b6a2015-02-03 11:31:05 -050035
Alexandre Lision624b1a82016-09-11 19:29:01 -040036// Ring
Alexandre Lision745e4d62015-03-22 20:03:10 -040037#import "AppDelegate.h"
Alexandre Lisionc65310c2015-04-23 16:44:23 -040038#import "Constants.h"
Alexandre Lision58cab672015-06-09 15:25:40 -040039#import "CurrentCallVC.h"
Alexandre Lision624b1a82016-09-11 19:29:01 -040040#import "MigrateRingAccountsWC.h"
Alexandre Lision0f66bd32016-01-18 11:30:45 -050041#import "ConversationVC.h"
Alexandre Lisionbfa68f62015-09-10 08:38:42 -040042#import "PreferencesWC.h"
Alexandre Lisiona3a43dc2017-03-30 16:21:30 -040043#import "SmartViewVC.h"
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -040044#import "views/IconButton.h"
Alexandre Lisionbfa68f62015-09-10 08:38:42 -040045#import "views/NSColor+RingTheme.h"
Alexandre Lisione77f6f92016-04-17 23:39:39 -040046#import "views/BackgroundView.h"
Kateryna Kostiuk13b76882017-03-30 09:18:44 -040047#import "ChooseAccountVC.h"
Kateryna Kostiukdb1f3a12017-04-24 12:08:28 -040048#import "ContactRequestVC.h"
Kateryna Kostiuk882cbac2017-07-05 17:29:00 -040049#import "PersonsVC.h"
Alexandre Lision2db8f472015-07-22 15:05:46 -040050
Kateryna Kostiuk13b76882017-03-30 09:18:44 -040051@interface RingWindowController () <MigrateRingAccountsDelegate, NSToolbarDelegate>
Alexandre Lision624b1a82016-09-11 19:29:01 -040052
53@property (retain) MigrateRingAccountsWC* migrateWC;
54
55@end
56
Alexandre Lisionbfa68f62015-09-10 08:38:42 -040057@implementation RingWindowController {
Alexandre Lision5855b6a2015-02-03 11:31:05 -050058
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -040059 __unsafe_unretained IBOutlet NSLayoutConstraint* centerYQRCodeConstraint;
60 __unsafe_unretained IBOutlet NSLayoutConstraint* centerYWelcomeContainerConstraint;
61 __unsafe_unretained IBOutlet NSView* welcomeContainer;
Alexandre Lision1abdf582016-02-09 14:21:19 -050062 __unsafe_unretained IBOutlet NSView* callView;
63 __unsafe_unretained IBOutlet NSTextField* ringIDLabel;
64 __unsafe_unretained IBOutlet NSButton* shareButton;
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -040065 __unsafe_unretained IBOutlet NSImageView* qrcodeView;
Alexandre Lision58cab672015-06-09 15:25:40 -040066
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -040067 PreferencesWC* preferencesWC;
Alexandre Lisiona3a43dc2017-03-30 16:21:30 -040068 IBOutlet SmartViewVC* smartViewVC;
Kateryna Kostiuk882cbac2017-07-05 17:29:00 -040069 IBOutlet PersonsVC* personsVC;
Alexandre Lisione77f6f92016-04-17 23:39:39 -040070
Alexandre Lision0f66bd32016-01-18 11:30:45 -050071 CurrentCallVC* currentCallVC;
72 ConversationVC* offlineVC;
Kateryna Kostiukdb1f3a12017-04-24 12:08:28 -040073 // toolbar menu items
Kateryna Kostiuk13b76882017-03-30 09:18:44 -040074 ChooseAccountVC* chooseAccountVC;
Kateryna Kostiukdb1f3a12017-04-24 12:08:28 -040075 ContactRequestVC* contactRequestVC;
Alexandre Lisionbfa68f62015-09-10 08:38:42 -040076}
Alexandre Lision58cab672015-06-09 15:25:40 -040077
Kateryna Kostiukdb1f3a12017-04-24 12:08:28 -040078static NSString* const kPreferencesIdentifier = @"PreferencesIdentifier";
79NSString* const kChangeAccountToolBarItemIdentifier = @"ChangeAccountToolBarItemIdentifier";
80NSString* const kTrustRequestMenuItemIdentifier = @"TrustRequestMenuItemIdentifier";
Alexandre Lisionc5148052015-03-04 15:10:35 -050081
Alexandre Lision5855b6a2015-02-03 11:31:05 -050082- (void)windowDidLoad {
83 [super windowDidLoad];
Alexandre Lision4dfcafc2015-08-20 12:43:23 -040084 [self.window setMovableByWindowBackground:YES];
Alexandre Lision58cab672015-06-09 15:25:40 -040085
Alexandre Lisione77f6f92016-04-17 23:39:39 -040086 [self.window setBackgroundColor:[NSColor colorWithRed:242.0/255 green:242.0/255 blue:242.0/255 alpha:1.0]];
Kateryna Kostiuk13b76882017-03-30 09:18:44 -040087 self.window.titleVisibility = NSWindowTitleHidden;
Alexandre Lisione77f6f92016-04-17 23:39:39 -040088
Alexandre Lision0f66bd32016-01-18 11:30:45 -050089 currentCallVC = [[CurrentCallVC alloc] initWithNibName:@"CurrentCall" bundle:nil];
90 offlineVC = [[ConversationVC alloc] initWithNibName:@"Conversation" bundle:nil];
Kateryna Kostiukdb1f3a12017-04-24 12:08:28 -040091 // toolbar items
Kateryna Kostiuk13b76882017-03-30 09:18:44 -040092 chooseAccountVC = [[ChooseAccountVC alloc] initWithNibName:@"ChooseAccount" bundle:nil];
Kateryna Kostiukdb1f3a12017-04-24 12:08:28 -040093 contactRequestVC = [[ContactRequestVC alloc] initWithNibName:@"ContactRequest" bundle:nil];
Alexandre Lision58cab672015-06-09 15:25:40 -040094 [callView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
Alexandre Lision0f66bd32016-01-18 11:30:45 -050095 [[currentCallVC view] setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
96 [[offlineVC view] setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
Alexandre Lision58cab672015-06-09 15:25:40 -040097
Alexandre Lision0f66bd32016-01-18 11:30:45 -050098 [callView addSubview:[currentCallVC view] positioned:NSWindowAbove relativeTo:nil];
99 [callView addSubview:[offlineVC view] positioned:NSWindowAbove relativeTo:nil];
Alexandre Lision16d9c0a2015-08-10 12:05:15 -0400100
Alexandre Lision0f66bd32016-01-18 11:30:45 -0500101 [currentCallVC initFrame];
102 [offlineVC initFrame];
Alexandre Lisionbb5c2462015-07-30 12:55:37 -0400103
Alexandre Lision624b1a82016-09-11 19:29:01 -0400104 [self checkAccountsToMigrate];
Alexandre Lision0f66bd32016-01-18 11:30:45 -0500105}
106
107- (void) connect
108{
Alexandre Lisionbb5c2462015-07-30 12:55:37 -0400109 // Update Ring ID label based on account model changes
Alexandre Lision0f66bd32016-01-18 11:30:45 -0500110 QObject::connect(RecentModel::instance().selectionModel(),
111 &QItemSelectionModel::currentChanged,
112 [=](const QModelIndex &current, const QModelIndex &previous) {
113 auto call = RecentModel::instance().getActiveCall(current);
Alexandre Lision261f1b92016-04-04 12:35:34 -0400114
Alexandre Lision0f66bd32016-01-18 11:30:45 -0500115 if(!current.isValid()) {
Alexandre Lision01cf5e32016-01-21 15:54:30 -0500116 [offlineVC animateOut];
Alexandre Lision0f66bd32016-01-18 11:30:45 -0500117 [currentCallVC animateOut];
Kateryna Kostiukabf4e272017-04-18 14:18:00 -0400118 [chooseAccountVC enable];
Alexandre Lision0f66bd32016-01-18 11:30:45 -0500119 return;
120 }
121
122 if (!call) {
123 [currentCallVC animateOut];
124 [offlineVC animateIn];
Kateryna Kostiukabf4e272017-04-18 14:18:00 -0400125 [chooseAccountVC enable];
Alexandre Lision0f66bd32016-01-18 11:30:45 -0500126 } else {
127 [currentCallVC animateIn];
Alexandre Lision01cf5e32016-01-21 15:54:30 -0500128 [offlineVC animateOut];
Kateryna Kostiukabf4e272017-04-18 14:18:00 -0400129 [chooseAccountVC disable];
Alexandre Lision0f66bd32016-01-18 11:30:45 -0500130 }
131 });
Alexandre Lision210fe212016-01-27 11:15:13 -0500132
133 QObject::connect(CallModel::instance().selectionModel(),
134 &QItemSelectionModel::currentChanged,
135 [=](const QModelIndex &current, const QModelIndex &previous) {
136 if(!current.isValid()) {
137 return;
138 }
139
140 if (previous.isValid()) {
141 // We were already on a call
142 [currentCallVC animateOut];
Kateryna Kostiukabf4e272017-04-18 14:18:00 -0400143 [chooseAccountVC enable];
Alexandre Lision210fe212016-01-27 11:15:13 -0500144 } else {
145 // Make sure Conversation view hides when selecting a valid call
146 [currentCallVC animateIn];
147 [offlineVC animateOut];
Kateryna Kostiukabf4e272017-04-18 14:18:00 -0400148 [chooseAccountVC disable];
Alexandre Lision210fe212016-01-27 11:15:13 -0500149 }
150 });
Kateryna Kostiuk312f9132017-04-18 12:09:06 -0400151 QObject::connect(AvailableAccountModel::instance().selectionModel(),
Kateryna Kostiuk13b76882017-03-30 09:18:44 -0400152 &QItemSelectionModel::currentChanged,
Kateryna Kostiuk312f9132017-04-18 12:09:06 -0400153 [self](const QModelIndex& idx){
Kateryna Kostiuk13b76882017-03-30 09:18:44 -0400154 [self updateRingID];
Kateryna Kostiukabf4e272017-04-18 14:18:00 -0400155 [offlineVC animateOut];
Kateryna Kostiuk13b76882017-03-30 09:18:44 -0400156 });
Alexandre Lisionbb5c2462015-07-30 12:55:37 -0400157}
158
159/**
160 * Implement the necessary logic to choose which Ring ID to display.
161 * This tries to choose the "best" ID to show
162 */
163- (void) updateRingID
164{
Alexandre Lisionbb5c2462015-07-30 12:55:37 -0400165 Account* finalChoice = nullptr;
166
167 [ringIDLabel setStringValue:@""];
Kateryna Kostiuk312f9132017-04-18 12:09:06 -0400168 QModelIndex index = AvailableAccountModel::instance().selectionModel()->currentIndex();
169 finalChoice = index.data(static_cast<int>(Account::Role::Object)).value<Account*>();
170 if(finalChoice == nil || (finalChoice->protocol() != Account::Protocol::RING)) {
Kateryna Kostiuka7248462017-04-18 16:15:31 -0400171 self.hideRingID = YES;
Kateryna Kostiuk312f9132017-04-18 12:09:06 -0400172 return;
Alexandre Lisionbb5c2462015-07-30 12:55:37 -0400173 }
Kateryna Kostiuka7248462017-04-18 16:15:31 -0400174 self.hideRingID = NO;
Alexandre Lision313427f2016-11-24 21:04:04 -0500175 auto name = finalChoice->registeredName();
Kateryna Kostiuk65ba43e2017-03-30 15:10:04 -0400176 NSString* uriToDisplay = nullptr;
Alexandre Lision313427f2016-11-24 21:04:04 -0500177 if (!name.isNull() && !name.isEmpty()) {
Kateryna Kostiuk65ba43e2017-03-30 15:10:04 -0400178 uriToDisplay = name.toNSString();
Alexandre Lision313427f2016-11-24 21:04:04 -0500179 } else {
Kateryna Kostiuk65ba43e2017-03-30 15:10:04 -0400180 uriToDisplay = finalChoice->username().toNSString();
Alexandre Lision313427f2016-11-24 21:04:04 -0500181 }
Kateryna Kostiuk65ba43e2017-03-30 15:10:04 -0400182 [ringIDLabel setStringValue:uriToDisplay];
183 [self drawQRCode:finalChoice->username().toNSString()];
Alexandre Lision5855b6a2015-02-03 11:31:05 -0500184}
185
Alexandre Lision1abdf582016-02-09 14:21:19 -0500186- (IBAction)shareRingID:(id)sender {
187 NSSharingServicePicker* sharingServicePicker = [[NSSharingServicePicker alloc] initWithItems:[NSArray arrayWithObject:[ringIDLabel stringValue]]];
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -0400188 [sharingServicePicker setDelegate:self];
Alexandre Lision1abdf582016-02-09 14:21:19 -0500189 [sharingServicePicker showRelativeToRect:[sender bounds]
190 ofView:sender
191 preferredEdge:NSMinYEdge];
192}
193
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -0400194- (IBAction)toggleQRCode:(id)sender {
195 // Toggle pressed state of QRCode button
196 [sender setPressed:![sender isPressed]];
Kateryna Kostiuk65ba43e2017-03-30 15:10:04 -0400197 [self showQRCode:[sender isPressed]];
Alexandre Lision313427f2016-11-24 21:04:04 -0500198}
199
200/**
201 * Draw the QRCode in the qrCodeView
202 */
Kateryna Kostiuk65ba43e2017-03-30 15:10:04 -0400203- (void)drawQRCode:(NSString*) uriToDraw
Alexandre Lision313427f2016-11-24 21:04:04 -0500204{
Kateryna Kostiuk65ba43e2017-03-30 15:10:04 -0400205 auto qrCode = QRcode_encodeString(uriToDraw.UTF8String,
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -0400206 0,
207 QR_ECLEVEL_L, // Lowest level of error correction
208 QR_MODE_8, // 8-bit data mode
209 1);
210 if (!qrCode) {
211 return;
212 }
213
Alexandre Lision313427f2016-11-24 21:04:04 -0500214 unsigned char *data = 0;
215 int width;
216 data = qrCode->data;
217 width = qrCode->width;
218 int qr_margin = 3;
219
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -0400220 CGFloat size = qrcodeView.frame.size.width;
221
222 // create context
223 CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
224 CGContextRef ctx = CGBitmapContextCreate(0, size, size, 8, size * 4, colorSpace, kCGImageAlphaPremultipliedLast);
225
226 CGAffineTransform translateTransform = CGAffineTransformMakeTranslation(0, -size);
227 CGAffineTransform scaleTransform = CGAffineTransformMakeScale(1, -1);
228 CGContextConcatCTM(ctx, CGAffineTransformConcat(translateTransform, scaleTransform));
229
Alexandre Lision313427f2016-11-24 21:04:04 -0500230 float zoom = ceil((double)size / (qrCode->width + 2.0 * qr_margin));
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -0400231 CGRect rectDraw = CGRectMake(0, 0, zoom, zoom);
232
233 int ran;
234 for(int i = 0; i < width; ++i) {
235 for(int j = 0; j < width; ++j) {
236 if(*data & 1) {
237 CGContextSetFillColorWithColor(ctx, [NSColor ringDarkGrey].CGColor);
238 rectDraw.origin = CGPointMake((j + qr_margin) * zoom,(i + qr_margin) * zoom);
239 CGContextAddRect(ctx, rectDraw);
240 CGContextFillPath(ctx);
241 } else {
242 CGContextSetFillColorWithColor(ctx, [NSColor windowBackgroundColor].CGColor);
243 rectDraw.origin = CGPointMake((j + qr_margin) * zoom,(i + qr_margin) * zoom);
244 CGContextAddRect(ctx, rectDraw);
245 CGContextFillPath(ctx);
246 }
247 ++data;
248 }
249 }
Alexandre Lision313427f2016-11-24 21:04:04 -0500250
251 // get image
252 auto qrCGImage = CGBitmapContextCreateImage(ctx);
253 auto qrImage = [[NSImage alloc] initWithCGImage:qrCGImage size:qrcodeView.frame.size];
254
255 // some releases
256 CGContextRelease(ctx);
257 CGImageRelease(qrCGImage);
258 CGColorSpaceRelease(colorSpace);
259 QRcode_free(qrCode);
260
261 [qrcodeView setImage:qrImage];
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -0400262}
263
264/**
265 * Start the in/out animation displaying the QRCode
266 * @param show should the QRCode be animated in or out
267 */
268- (void) showQRCode:(BOOL) show
269{
270 static const NSInteger offset = 110;
271 [NSAnimationContext beginGrouping];
272 NSAnimationContext.currentContext.duration = 0.5;
273 [[NSAnimationContext currentContext] setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]];
274 qrcodeView.animator.alphaValue = show ? 1.0 : 0.0;
275 [centerYQRCodeConstraint.animator setConstant: show ? offset : 0];
276 [centerYWelcomeContainerConstraint.animator setConstant:show ? -offset : 0];
277 [NSAnimationContext endGrouping];
278}
279
Alexandre Lision4a7b95e2015-02-20 10:06:43 -0500280- (IBAction)openPreferences:(id)sender
281{
Alexandre Lisionbfa68f62015-09-10 08:38:42 -0400282 preferencesWC = [[PreferencesWC alloc] initWithWindowNibName:@"PreferencesWindow"];
283 [preferencesWC.window makeKeyAndOrderFront:preferencesWC.window];
Alexandre Lision5855b6a2015-02-03 11:31:05 -0500284}
Alexandre Lision4a7b95e2015-02-20 10:06:43 -0500285
Alexandre Lisiona3a43dc2017-03-30 16:21:30 -0400286- (IBAction)showHistory:(NSButton*)sender
287{
288 [smartViewVC showHistory];
289}
290
291- (IBAction)showContacts:(NSButton*)sender
292{
293 [smartViewVC showContacts];
294}
295
296- (IBAction)showSmartlist:(NSButton*)sender
297{
298 [smartViewVC showSmartlist];
299}
300
Kateryna Kostiuk882cbac2017-07-05 17:29:00 -0400301- (IBAction)callClickedAtRow:(id)sender
302{
303 NSTabViewItem *selectedTab = [smartViewVC.tabbar selectedTabViewItem];
304 int index = [smartViewVC.tabbar indexOfTabViewItem:selectedTab];
305 switch (index) {
306 case 0:
307 [smartViewVC startCallForRow:sender];
308 break;
309 case 2:
310 [personsVC startCallForRow:sender];
311 break;
312 default:
313 break;
314 }
315}
Alexandre Lision624b1a82016-09-11 19:29:01 -0400316#pragma mark - Ring account migration
317
318- (void) migrateRingAccount:(Account*) acc
319{
320 self.migrateWC = [[MigrateRingAccountsWC alloc] initWithDelegate:self actionCode:1];
321 self.migrateWC.account = acc;
322#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_9
323 [self.window beginSheet:self.migrateWC.window completionHandler:nil];
324#else
325 [NSApp beginSheet: self.migrateWC.window
326 modalForWindow: self.window
327 modalDelegate: self
328 didEndSelector: nil
329 contextInfo: nil];
330#endif
331}
332
333- (void)checkAccountsToMigrate
334{
335 auto ringList = AccountModel::instance().accountsToMigrate();
336 if (ringList.length() > 0){
337 Account* acc = ringList.value(0);
338 [self migrateRingAccount:acc];
339 } else {
340 // Fresh run, we need to make sure RingID appears
Alexandre Lision624b1a82016-09-11 19:29:01 -0400341 [shareButton sendActionOn:NSLeftMouseDownMask];
342
343 [self connect];
Kateryna Kostiuka7248462017-04-18 16:15:31 -0400344 [self updateRingID];
Kateryna Kostiuk13b76882017-03-30 09:18:44 -0400345 // display accounts to select
346 NSToolbar *toolbar = self.window.toolbar;
347 toolbar.delegate = self;
348 [toolbar insertItemWithItemIdentifier:kChangeAccountToolBarItemIdentifier atIndex:1];
Kateryna Kostiukdb1f3a12017-04-24 12:08:28 -0400349 [toolbar insertItemWithItemIdentifier:kTrustRequestMenuItemIdentifier atIndex:2];
Alexandre Lision624b1a82016-09-11 19:29:01 -0400350 }
351}
352
353- (void)migrationDidComplete
354{
355 [self checkAccountsToMigrate];
356}
357
358- (void)migrationDidCompleteWithError
359{
360 [self checkAccountsToMigrate];
361}
362
Kateryna Kostiuk13b76882017-03-30 09:18:44 -0400363#pragma mark - NSToolbarDelegate
Kateryna Kostiukdb1f3a12017-04-24 12:08:28 -0400364- (nullable NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag
365{
366 if(itemIdentifier == kChangeAccountToolBarItemIdentifier) {
367 NSToolbarItem *toolbarItem = [[NSToolbarItem alloc] initWithItemIdentifier:kChangeAccountToolBarItemIdentifier];
368 toolbarItem.view = chooseAccountVC.view;
369 return toolbarItem;
Kateryna Kostiuk13b76882017-03-30 09:18:44 -0400370 }
Kateryna Kostiukdb1f3a12017-04-24 12:08:28 -0400371 if(itemIdentifier == kTrustRequestMenuItemIdentifier) {
372 NSToolbarItem *toolbarItem = [[NSToolbarItem alloc] initWithItemIdentifier:kTrustRequestMenuItemIdentifier];
373 toolbarItem.view = contactRequestVC.view;
374 return toolbarItem;
375 }
376 return nil;
Kateryna Kostiuk13b76882017-03-30 09:18:44 -0400377}
378
Alexandre Lision5855b6a2015-02-03 11:31:05 -0500379@end