@@ -42,24 +42,16 @@ @interface SharedItemsViewController () <UITableViewDataSource, UITableViewDeleg
42
42
@property (weak , nonatomic ) IBOutlet UIBarButtonItem *removeShareBarButtonItem;
43
43
@property (weak , nonatomic ) IBOutlet UIBarButtonItem *removeLinkBarButtonItem;
44
44
45
- @property (nonatomic , strong ) MEGAShareList *incomingShareList;
46
45
@property (nonatomic , strong ) NSMutableArray *incomingNodesMutableArray;
47
-
48
- @property (nonatomic , strong ) MEGAShareList *outgoingShareList;
49
- @property (nonatomic , strong ) NSMutableArray *outgoingSharesMutableArray;
50
46
@property (nonatomic , strong ) NSMutableArray *outgoingNodesMutableArray;
51
-
52
- @property (nonatomic , strong ) NSArray *publicLinksArray;
53
-
47
+ @property (nonatomic , strong ) NSMutableArray *outgoingSharesMutableArray;
54
48
@property (nonatomic , strong ) NSMutableArray *selectedSharesMutableArray;
55
49
56
50
@property (nonatomic , strong ) NSMutableDictionary *incomingNodesForEmailMutableDictionary;
57
51
@property (nonatomic , strong ) NSMutableDictionary *incomingIndexPathsMutableDictionary;
58
52
@property (nonatomic , strong ) NSMutableDictionary *outgoingNodesForEmailMutableDictionary;
59
53
@property (nonatomic , strong ) NSMutableDictionary *outgoingIndexPathsMutableDictionary;
60
54
61
- @property (nonatomic ) NSMutableArray *searchNodesArray;
62
-
63
55
@property (nonatomic , assign ) BOOL shouldRemovePlayerDelegate;
64
56
65
57
@end
@@ -227,24 +219,21 @@ - (void)reloadUI {
227
219
}
228
220
229
221
[self updateNavigationBarTitle ];
222
+ [self configNavigationBarButtonItems ];
230
223
231
224
[self .tableView reloadData ];
232
225
}
233
226
234
227
- (void )internetConnectionChanged {
235
228
BOOL boolValue = [MEGAReachabilityManager isReachable ];
236
- [self setNavigationBarButtonItemsEnabled: boolValue];
229
+ [self setNavigationBarButtonItemsEnabled: boolValue || self .tableView.isEditing ];
237
230
[self toolbarItemsSetEnabled: boolValue];
238
231
239
232
boolValue ? [self addSearchBar ] : [self hideSearchBarIfNotActive ];
240
233
241
234
[self .tableView reloadData ];
242
235
}
243
236
244
- - (void )setNavigationBarButtonItemsEnabled : (BOOL )boolValue {
245
- [self .editBarButtonItem setEnabled: boolValue];
246
- }
247
-
248
237
- (void )toolbarItemsSetEnabled : (BOOL )boolValue {
249
238
[_downloadBarButtonItem setEnabled: boolValue];
250
239
[_carbonCopyBarButtonItem setEnabled: boolValue];
@@ -631,6 +620,7 @@ - (void)didTapSelect {
631
620
self.selectedSharesMutableArray = NSMutableArray .alloc .init ;
632
621
633
622
[self configToolbarItemsForSharedItems ];
623
+ [self configNavigationBarButtonItems ];
634
624
[self toolbarItemsSetEnabled: NO ];
635
625
}
636
626
@@ -932,13 +922,6 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
932
922
}
933
923
}
934
924
}
935
-
936
- if (numberOfRows == 0 ) {
937
- [self setNavigationBarButtonItemsEnabled: NO ];
938
- } else {
939
- [self setNavigationBarButtonItemsEnabled: YES ];
940
- }
941
-
942
925
return numberOfRows;
943
926
}
944
927
@@ -1133,7 +1116,7 @@ - (void)tableView:(UITableView *)tableView willPerformPreviewActionForMenuWithCo
1133
1116
#pragma mark - UISearchBarDelegate
1134
1117
1135
1118
- (void )searchBarCancelButtonClicked : (UISearchBar *)searchBar {
1136
- self.searchNodesArray = nil ;
1119
+ [ self .searchNodesArray removeAllObjects ] ;
1137
1120
[self .searchUnverifiedNodesArray removeAllObjects ];
1138
1121
[self .searchUnverifiedSharesArray removeAllObjects ];
1139
1122
0 commit comments