Explorar el Código

FTP & UPnP list view: use exposed cell identifier

Felix Paul Kühne hace 10 años
padre
commit
483688bedd

+ 2 - 6
Sources/VLCFTPServerListViewController.m

@@ -183,15 +183,11 @@
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
 {
-    static NSString *CellIdentifier = @"LocalNetworkCellDetail";
-
-    VLCNetworkListCell *cell = (VLCNetworkListCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+    VLCNetworkListCell *cell = (VLCNetworkListCell *)[tableView dequeueReusableCellWithIdentifier:VLCNetworkListCellIdentifier];
     if (cell == nil)
-        cell = [VLCNetworkListCell cellWithReuseIdentifier:CellIdentifier];
-
+        cell = [VLCNetworkListCell cellWithReuseIdentifier:VLCNetworkListCellIdentifier];
 
     NSDictionary *cellObject;
-
     if (tableView == self.searchDisplayController.searchResultsTableView)
         cellObject = _searchData[indexPath.row];
     else

+ 2 - 4
Sources/VLCUPnPServerListViewController.m

@@ -109,11 +109,9 @@
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
 {
-    static NSString *CellIdentifier = @"LocalNetworkCellDetail";
-
-    VLCNetworkListCell *cell = (VLCNetworkListCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+    VLCNetworkListCell *cell = (VLCNetworkListCell *)[tableView dequeueReusableCellWithIdentifier:VLCNetworkListCellIdentifier];
     if (cell == nil)
-        cell = [VLCNetworkListCell cellWithReuseIdentifier:CellIdentifier];
+        cell = [VLCNetworkListCell cellWithReuseIdentifier:VLCNetworkListCellIdentifier];
 
     MediaServer1BasicObject *item;
     if (tableView == self.searchDisplayController.searchResultsTableView) {