blob: b1948a74d99758f7eb80cd4f847cd079a60d2eb5 [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>
Anthony Léonard79597602017-11-13 15:47:09 -050022#include <memory>
Alexandre Lision0f66bd32016-01-18 11:30:45 -050023
24//Qt
25#import <QItemSelectionModel>
26#import <QItemSelection>
Alexandre Lision5855b6a2015-02-03 11:31:05 -050027
Alexandre Lisionbb5c2462015-07-30 12:55:37 -040028//LRC
Alexandre Lision5855b6a2015-02-03 11:31:05 -050029#import <accountmodel.h>
30#import <callmodel.h>
31#import <account.h>
Alexandre Lision91d11e52015-03-20 17:42:05 -040032#import <call.h>
Alexandre Lision0f66bd32016-01-18 11:30:45 -050033#import <recentmodel.h>
Kateryna Kostiuk312f9132017-04-18 12:09:06 -040034#import <AvailableAccountModel.h>
Anthony Léonard79597602017-11-13 15:47:09 -050035#import <api/lrc.h>
Alexandre Lision5855b6a2015-02-03 11:31:05 -050036
Alexandre Lision624b1a82016-09-11 19:29:01 -040037// Ring
Alexandre Lision745e4d62015-03-22 20:03:10 -040038#import "AppDelegate.h"
Alexandre Lisionc65310c2015-04-23 16:44:23 -040039#import "Constants.h"
Alexandre Lision58cab672015-06-09 15:25:40 -040040#import "CurrentCallVC.h"
Alexandre Lision624b1a82016-09-11 19:29:01 -040041#import "MigrateRingAccountsWC.h"
Alexandre Lision0f66bd32016-01-18 11:30:45 -050042#import "ConversationVC.h"
Alexandre Lisionbfa68f62015-09-10 08:38:42 -040043#import "PreferencesWC.h"
Alexandre Lisiona3a43dc2017-03-30 16:21:30 -040044#import "SmartViewVC.h"
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -040045#import "views/IconButton.h"
Alexandre Lisionbfa68f62015-09-10 08:38:42 -040046#import "views/NSColor+RingTheme.h"
Alexandre Lisione77f6f92016-04-17 23:39:39 -040047#import "views/BackgroundView.h"
Kateryna Kostiuk13b76882017-03-30 09:18:44 -040048#import "ChooseAccountVC.h"
Kateryna Kostiukdb1f3a12017-04-24 12:08:28 -040049#import "ContactRequestVC.h"
Kateryna Kostiuk882cbac2017-07-05 17:29:00 -040050#import "PersonsVC.h"
Alexandre Lision2db8f472015-07-22 15:05:46 -040051
Kateryna Kostiuk13b76882017-03-30 09:18:44 -040052@interface RingWindowController () <MigrateRingAccountsDelegate, NSToolbarDelegate>
Alexandre Lision624b1a82016-09-11 19:29:01 -040053
54@property (retain) MigrateRingAccountsWC* migrateWC;
55
56@end
57
Alexandre Lisionbfa68f62015-09-10 08:38:42 -040058@implementation RingWindowController {
Alexandre Lision5855b6a2015-02-03 11:31:05 -050059
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -040060 __unsafe_unretained IBOutlet NSLayoutConstraint* centerYQRCodeConstraint;
61 __unsafe_unretained IBOutlet NSLayoutConstraint* centerYWelcomeContainerConstraint;
62 __unsafe_unretained IBOutlet NSView* welcomeContainer;
Alexandre Lision1abdf582016-02-09 14:21:19 -050063 __unsafe_unretained IBOutlet NSView* callView;
64 __unsafe_unretained IBOutlet NSTextField* ringIDLabel;
65 __unsafe_unretained IBOutlet NSButton* shareButton;
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -040066 __unsafe_unretained IBOutlet NSImageView* qrcodeView;
Alexandre Lision58cab672015-06-09 15:25:40 -040067
Anthony Léonard79597602017-11-13 15:47:09 -050068 std::unique_ptr<lrc::api::Lrc> lrc_;
69
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -040070 PreferencesWC* preferencesWC;
Alexandre Lisiona3a43dc2017-03-30 16:21:30 -040071 IBOutlet SmartViewVC* smartViewVC;
Kateryna Kostiuk882cbac2017-07-05 17:29:00 -040072 IBOutlet PersonsVC* personsVC;
Alexandre Lisione77f6f92016-04-17 23:39:39 -040073
Alexandre Lision0f66bd32016-01-18 11:30:45 -050074 CurrentCallVC* currentCallVC;
75 ConversationVC* offlineVC;
Kateryna Kostiukdb1f3a12017-04-24 12:08:28 -040076 // toolbar menu items
Kateryna Kostiuk13b76882017-03-30 09:18:44 -040077 ChooseAccountVC* chooseAccountVC;
Kateryna Kostiukdb1f3a12017-04-24 12:08:28 -040078 ContactRequestVC* contactRequestVC;
Alexandre Lisionbfa68f62015-09-10 08:38:42 -040079}
Alexandre Lision58cab672015-06-09 15:25:40 -040080
Kateryna Kostiukdb1f3a12017-04-24 12:08:28 -040081static NSString* const kPreferencesIdentifier = @"PreferencesIdentifier";
82NSString* const kChangeAccountToolBarItemIdentifier = @"ChangeAccountToolBarItemIdentifier";
83NSString* const kTrustRequestMenuItemIdentifier = @"TrustRequestMenuItemIdentifier";
Alexandre Lisionc5148052015-03-04 15:10:35 -050084
Alexandre Lision5855b6a2015-02-03 11:31:05 -050085- (void)windowDidLoad {
86 [super windowDidLoad];
Alexandre Lision4dfcafc2015-08-20 12:43:23 -040087 [self.window setMovableByWindowBackground:YES];
Alexandre Lision58cab672015-06-09 15:25:40 -040088
Alexandre Lisione77f6f92016-04-17 23:39:39 -040089 [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 -040090 self.window.titleVisibility = NSWindowTitleHidden;
Alexandre Lisione77f6f92016-04-17 23:39:39 -040091
Anthony Léonard79597602017-11-13 15:47:09 -050092 lrc_ = std::make_unique<lrc::api::Lrc>();
93
Alexandre Lision0f66bd32016-01-18 11:30:45 -050094 currentCallVC = [[CurrentCallVC alloc] initWithNibName:@"CurrentCall" bundle:nil];
95 offlineVC = [[ConversationVC alloc] initWithNibName:@"Conversation" bundle:nil];
Kateryna Kostiukdb1f3a12017-04-24 12:08:28 -040096 // toolbar items
Kateryna Kostiuk13b76882017-03-30 09:18:44 -040097 chooseAccountVC = [[ChooseAccountVC alloc] initWithNibName:@"ChooseAccount" bundle:nil];
Kateryna Kostiukdb1f3a12017-04-24 12:08:28 -040098 contactRequestVC = [[ContactRequestVC alloc] initWithNibName:@"ContactRequest" bundle:nil];
Alexandre Lision58cab672015-06-09 15:25:40 -040099 [callView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
Alexandre Lision0f66bd32016-01-18 11:30:45 -0500100 [[currentCallVC view] setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
101 [[offlineVC view] setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
Alexandre Lision58cab672015-06-09 15:25:40 -0400102
Alexandre Lision0f66bd32016-01-18 11:30:45 -0500103 [callView addSubview:[currentCallVC view] positioned:NSWindowAbove relativeTo:nil];
104 [callView addSubview:[offlineVC view] positioned:NSWindowAbove relativeTo:nil];
Alexandre Lision16d9c0a2015-08-10 12:05:15 -0400105
Alexandre Lision0f66bd32016-01-18 11:30:45 -0500106 [currentCallVC initFrame];
107 [offlineVC initFrame];
Alexandre Lisionbb5c2462015-07-30 12:55:37 -0400108
Alexandre Lision624b1a82016-09-11 19:29:01 -0400109 [self checkAccountsToMigrate];
Alexandre Lision0f66bd32016-01-18 11:30:45 -0500110}
111
112- (void) connect
113{
Alexandre Lisionbb5c2462015-07-30 12:55:37 -0400114 // Update Ring ID label based on account model changes
Alexandre Lision0f66bd32016-01-18 11:30:45 -0500115 QObject::connect(RecentModel::instance().selectionModel(),
116 &QItemSelectionModel::currentChanged,
117 [=](const QModelIndex &current, const QModelIndex &previous) {
118 auto call = RecentModel::instance().getActiveCall(current);
Alexandre Lision261f1b92016-04-04 12:35:34 -0400119
Alexandre Lision0f66bd32016-01-18 11:30:45 -0500120 if(!current.isValid()) {
Alexandre Lision01cf5e32016-01-21 15:54:30 -0500121 [offlineVC animateOut];
Alexandre Lision0f66bd32016-01-18 11:30:45 -0500122 [currentCallVC animateOut];
Kateryna Kostiukabf4e272017-04-18 14:18:00 -0400123 [chooseAccountVC enable];
Alexandre Lision0f66bd32016-01-18 11:30:45 -0500124 return;
125 }
126
127 if (!call) {
128 [currentCallVC animateOut];
129 [offlineVC animateIn];
Kateryna Kostiukabf4e272017-04-18 14:18:00 -0400130 [chooseAccountVC enable];
Alexandre Lision0f66bd32016-01-18 11:30:45 -0500131 } else {
132 [currentCallVC animateIn];
Alexandre Lision01cf5e32016-01-21 15:54:30 -0500133 [offlineVC animateOut];
Kateryna Kostiukabf4e272017-04-18 14:18:00 -0400134 [chooseAccountVC disable];
Alexandre Lision0f66bd32016-01-18 11:30:45 -0500135 }
136 });
Alexandre Lision210fe212016-01-27 11:15:13 -0500137
138 QObject::connect(CallModel::instance().selectionModel(),
139 &QItemSelectionModel::currentChanged,
140 [=](const QModelIndex &current, const QModelIndex &previous) {
141 if(!current.isValid()) {
142 return;
143 }
144
145 if (previous.isValid()) {
146 // We were already on a call
147 [currentCallVC animateOut];
Kateryna Kostiukabf4e272017-04-18 14:18:00 -0400148 [chooseAccountVC enable];
Alexandre Lision210fe212016-01-27 11:15:13 -0500149 } else {
150 // Make sure Conversation view hides when selecting a valid call
151 [currentCallVC animateIn];
152 [offlineVC animateOut];
Kateryna Kostiukabf4e272017-04-18 14:18:00 -0400153 [chooseAccountVC disable];
Alexandre Lision210fe212016-01-27 11:15:13 -0500154 }
155 });
Kateryna Kostiuk312f9132017-04-18 12:09:06 -0400156 QObject::connect(AvailableAccountModel::instance().selectionModel(),
Kateryna Kostiuk13b76882017-03-30 09:18:44 -0400157 &QItemSelectionModel::currentChanged,
Kateryna Kostiuk312f9132017-04-18 12:09:06 -0400158 [self](const QModelIndex& idx){
Kateryna Kostiuk13b76882017-03-30 09:18:44 -0400159 [self updateRingID];
Kateryna Kostiukabf4e272017-04-18 14:18:00 -0400160 [offlineVC animateOut];
Kateryna Kostiuk13b76882017-03-30 09:18:44 -0400161 });
Alexandre Lisionbb5c2462015-07-30 12:55:37 -0400162}
163
164/**
165 * Implement the necessary logic to choose which Ring ID to display.
166 * This tries to choose the "best" ID to show
167 */
168- (void) updateRingID
169{
Alexandre Lisionbb5c2462015-07-30 12:55:37 -0400170 Account* finalChoice = nullptr;
171
172 [ringIDLabel setStringValue:@""];
Kateryna Kostiuk312f9132017-04-18 12:09:06 -0400173 QModelIndex index = AvailableAccountModel::instance().selectionModel()->currentIndex();
174 finalChoice = index.data(static_cast<int>(Account::Role::Object)).value<Account*>();
175 if(finalChoice == nil || (finalChoice->protocol() != Account::Protocol::RING)) {
Kateryna Kostiuka7248462017-04-18 16:15:31 -0400176 self.hideRingID = YES;
Kateryna Kostiuk312f9132017-04-18 12:09:06 -0400177 return;
Alexandre Lisionbb5c2462015-07-30 12:55:37 -0400178 }
Kateryna Kostiuka7248462017-04-18 16:15:31 -0400179 self.hideRingID = NO;
Alexandre Lision313427f2016-11-24 21:04:04 -0500180 auto name = finalChoice->registeredName();
Kateryna Kostiuk65ba43e2017-03-30 15:10:04 -0400181 NSString* uriToDisplay = nullptr;
Alexandre Lision313427f2016-11-24 21:04:04 -0500182 if (!name.isNull() && !name.isEmpty()) {
Kateryna Kostiuk65ba43e2017-03-30 15:10:04 -0400183 uriToDisplay = name.toNSString();
Alexandre Lision313427f2016-11-24 21:04:04 -0500184 } else {
Kateryna Kostiuk65ba43e2017-03-30 15:10:04 -0400185 uriToDisplay = finalChoice->username().toNSString();
Alexandre Lision313427f2016-11-24 21:04:04 -0500186 }
Kateryna Kostiuk65ba43e2017-03-30 15:10:04 -0400187 [ringIDLabel setStringValue:uriToDisplay];
188 [self drawQRCode:finalChoice->username().toNSString()];
Alexandre Lision5855b6a2015-02-03 11:31:05 -0500189}
190
Alexandre Lision1abdf582016-02-09 14:21:19 -0500191- (IBAction)shareRingID:(id)sender {
192 NSSharingServicePicker* sharingServicePicker = [[NSSharingServicePicker alloc] initWithItems:[NSArray arrayWithObject:[ringIDLabel stringValue]]];
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -0400193 [sharingServicePicker setDelegate:self];
Alexandre Lision1abdf582016-02-09 14:21:19 -0500194 [sharingServicePicker showRelativeToRect:[sender bounds]
195 ofView:sender
196 preferredEdge:NSMinYEdge];
197}
198
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -0400199- (IBAction)toggleQRCode:(id)sender {
200 // Toggle pressed state of QRCode button
201 [sender setPressed:![sender isPressed]];
Kateryna Kostiuk65ba43e2017-03-30 15:10:04 -0400202 [self showQRCode:[sender isPressed]];
Alexandre Lision313427f2016-11-24 21:04:04 -0500203}
204
205/**
206 * Draw the QRCode in the qrCodeView
207 */
Kateryna Kostiuk65ba43e2017-03-30 15:10:04 -0400208- (void)drawQRCode:(NSString*) uriToDraw
Alexandre Lision313427f2016-11-24 21:04:04 -0500209{
Kateryna Kostiuk65ba43e2017-03-30 15:10:04 -0400210 auto qrCode = QRcode_encodeString(uriToDraw.UTF8String,
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -0400211 0,
212 QR_ECLEVEL_L, // Lowest level of error correction
213 QR_MODE_8, // 8-bit data mode
214 1);
215 if (!qrCode) {
216 return;
217 }
218
Alexandre Lision313427f2016-11-24 21:04:04 -0500219 unsigned char *data = 0;
220 int width;
221 data = qrCode->data;
222 width = qrCode->width;
223 int qr_margin = 3;
224
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -0400225 CGFloat size = qrcodeView.frame.size.width;
226
227 // create context
228 CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
229 CGContextRef ctx = CGBitmapContextCreate(0, size, size, 8, size * 4, colorSpace, kCGImageAlphaPremultipliedLast);
230
231 CGAffineTransform translateTransform = CGAffineTransformMakeTranslation(0, -size);
232 CGAffineTransform scaleTransform = CGAffineTransformMakeScale(1, -1);
233 CGContextConcatCTM(ctx, CGAffineTransformConcat(translateTransform, scaleTransform));
234
Alexandre Lision313427f2016-11-24 21:04:04 -0500235 float zoom = ceil((double)size / (qrCode->width + 2.0 * qr_margin));
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -0400236 CGRect rectDraw = CGRectMake(0, 0, zoom, zoom);
237
238 int ran;
239 for(int i = 0; i < width; ++i) {
240 for(int j = 0; j < width; ++j) {
241 if(*data & 1) {
242 CGContextSetFillColorWithColor(ctx, [NSColor ringDarkGrey].CGColor);
243 rectDraw.origin = CGPointMake((j + qr_margin) * zoom,(i + qr_margin) * zoom);
244 CGContextAddRect(ctx, rectDraw);
245 CGContextFillPath(ctx);
246 } else {
247 CGContextSetFillColorWithColor(ctx, [NSColor windowBackgroundColor].CGColor);
248 rectDraw.origin = CGPointMake((j + qr_margin) * zoom,(i + qr_margin) * zoom);
249 CGContextAddRect(ctx, rectDraw);
250 CGContextFillPath(ctx);
251 }
252 ++data;
253 }
254 }
Alexandre Lision313427f2016-11-24 21:04:04 -0500255
256 // get image
257 auto qrCGImage = CGBitmapContextCreateImage(ctx);
258 auto qrImage = [[NSImage alloc] initWithCGImage:qrCGImage size:qrcodeView.frame.size];
259
260 // some releases
261 CGContextRelease(ctx);
262 CGImageRelease(qrCGImage);
263 CGColorSpaceRelease(colorSpace);
264 QRcode_free(qrCode);
265
266 [qrcodeView setImage:qrImage];
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -0400267}
268
269/**
270 * Start the in/out animation displaying the QRCode
271 * @param show should the QRCode be animated in or out
272 */
273- (void) showQRCode:(BOOL) show
274{
275 static const NSInteger offset = 110;
276 [NSAnimationContext beginGrouping];
277 NSAnimationContext.currentContext.duration = 0.5;
278 [[NSAnimationContext currentContext] setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]];
279 qrcodeView.animator.alphaValue = show ? 1.0 : 0.0;
280 [centerYQRCodeConstraint.animator setConstant: show ? offset : 0];
281 [centerYWelcomeContainerConstraint.animator setConstant:show ? -offset : 0];
282 [NSAnimationContext endGrouping];
283}
284
Alexandre Lision4a7b95e2015-02-20 10:06:43 -0500285- (IBAction)openPreferences:(id)sender
286{
Alexandre Lisionbfa68f62015-09-10 08:38:42 -0400287 preferencesWC = [[PreferencesWC alloc] initWithWindowNibName:@"PreferencesWindow"];
288 [preferencesWC.window makeKeyAndOrderFront:preferencesWC.window];
Alexandre Lision5855b6a2015-02-03 11:31:05 -0500289}
Alexandre Lision4a7b95e2015-02-20 10:06:43 -0500290
Kateryna Kostiuk882cbac2017-07-05 17:29:00 -0400291- (IBAction)callClickedAtRow:(id)sender
292{
293 NSTabViewItem *selectedTab = [smartViewVC.tabbar selectedTabViewItem];
294 int index = [smartViewVC.tabbar indexOfTabViewItem:selectedTab];
295 switch (index) {
296 case 0:
297 [smartViewVC startCallForRow:sender];
298 break;
299 case 2:
300 [personsVC startCallForRow:sender];
301 break;
302 default:
303 break;
304 }
305}
Alexandre Lision624b1a82016-09-11 19:29:01 -0400306#pragma mark - Ring account migration
307
308- (void) migrateRingAccount:(Account*) acc
309{
310 self.migrateWC = [[MigrateRingAccountsWC alloc] initWithDelegate:self actionCode:1];
311 self.migrateWC.account = acc;
312#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_9
313 [self.window beginSheet:self.migrateWC.window completionHandler:nil];
314#else
315 [NSApp beginSheet: self.migrateWC.window
316 modalForWindow: self.window
317 modalDelegate: self
318 didEndSelector: nil
319 contextInfo: nil];
320#endif
321}
322
323- (void)checkAccountsToMigrate
324{
325 auto ringList = AccountModel::instance().accountsToMigrate();
326 if (ringList.length() > 0){
327 Account* acc = ringList.value(0);
328 [self migrateRingAccount:acc];
329 } else {
330 // Fresh run, we need to make sure RingID appears
Alexandre Lision624b1a82016-09-11 19:29:01 -0400331 [shareButton sendActionOn:NSLeftMouseDownMask];
332
333 [self connect];
Kateryna Kostiuka7248462017-04-18 16:15:31 -0400334 [self updateRingID];
Kateryna Kostiuk13b76882017-03-30 09:18:44 -0400335 // display accounts to select
336 NSToolbar *toolbar = self.window.toolbar;
337 toolbar.delegate = self;
338 [toolbar insertItemWithItemIdentifier:kChangeAccountToolBarItemIdentifier atIndex:1];
Kateryna Kostiukdb1f3a12017-04-24 12:08:28 -0400339 [toolbar insertItemWithItemIdentifier:kTrustRequestMenuItemIdentifier atIndex:2];
Alexandre Lision624b1a82016-09-11 19:29:01 -0400340 }
341}
342
343- (void)migrationDidComplete
344{
345 [self checkAccountsToMigrate];
346}
347
348- (void)migrationDidCompleteWithError
349{
350 [self checkAccountsToMigrate];
351}
352
Kateryna Kostiuk13b76882017-03-30 09:18:44 -0400353#pragma mark - NSToolbarDelegate
Kateryna Kostiukdb1f3a12017-04-24 12:08:28 -0400354- (nullable NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag
355{
356 if(itemIdentifier == kChangeAccountToolBarItemIdentifier) {
357 NSToolbarItem *toolbarItem = [[NSToolbarItem alloc] initWithItemIdentifier:kChangeAccountToolBarItemIdentifier];
358 toolbarItem.view = chooseAccountVC.view;
359 return toolbarItem;
Kateryna Kostiuk13b76882017-03-30 09:18:44 -0400360 }
Kateryna Kostiukdb1f3a12017-04-24 12:08:28 -0400361 if(itemIdentifier == kTrustRequestMenuItemIdentifier) {
362 NSToolbarItem *toolbarItem = [[NSToolbarItem alloc] initWithItemIdentifier:kTrustRequestMenuItemIdentifier];
363 toolbarItem.view = contactRequestVC.view;
364 return toolbarItem;
365 }
366 return nil;
Kateryna Kostiuk13b76882017-03-30 09:18:44 -0400367}
368
Alexandre Lision5855b6a2015-02-03 11:31:05 -0500369@end