| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_collectio
n_updater.h" | 5 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_collectio
n_updater.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/mac/foundation_util.h" | 8 #include "base/mac/foundation_util.h" |
| 9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 NSIndexPath* addedIndexPath = [self addItem:articleItem | 272 NSIndexPath* addedIndexPath = [self addItem:articleItem |
| 273 toSectionWithIdentifier:sectionIdentifier]; | 273 toSectionWithIdentifier:sectionIdentifier]; |
| 274 [indexPaths addObject:addedIndexPath]; | 274 [indexPaths addObject:addedIndexPath]; |
| 275 break; | 275 break; |
| 276 } | 276 } |
| 277 case ContentSuggestionTypeReadingList: { | 277 case ContentSuggestionTypeReadingList: { |
| 278 ContentSuggestionsReadingListItem* readingListItem = | 278 ContentSuggestionsReadingListItem* readingListItem = |
| 279 [[ContentSuggestionsReadingListItem alloc] | 279 [[ContentSuggestionsReadingListItem alloc] |
| 280 initWithType:ItemTypeReadingList | 280 initWithType:ItemTypeReadingList |
| 281 url:suggestion.url | 281 url:suggestion.url |
| 282 distillationState:ReadingListUIDistillationStatusPending]; | 282 distillationState:suggestion.readingListExtra.status]; |
| 283 readingListItem.title = suggestion.title; | 283 readingListItem.title = suggestion.title; |
| 284 readingListItem.subtitle = suggestion.publisher; | 284 readingListItem.subtitle = suggestion.publisher; |
| 285 | 285 |
| 286 readingListItem.suggestionIdentifier = suggestion.suggestionIdentifier; | 286 readingListItem.suggestionIdentifier = suggestion.suggestionIdentifier; |
| 287 | 287 |
| 288 NSIndexPath* addedIndexPath = [self addItem:readingListItem | 288 NSIndexPath* addedIndexPath = [self addItem:readingListItem |
| 289 toSectionWithIdentifier:sectionIdentifier]; | 289 toSectionWithIdentifier:sectionIdentifier]; |
| 290 [indexPaths addObject:addedIndexPath]; | 290 [indexPaths addObject:addedIndexPath]; |
| 291 break; | 291 break; |
| 292 } | 292 } |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 [model sectionIdentifierForSection:sectionNumber]; | 512 [model sectionIdentifierForSection:sectionNumber]; |
| 513 if ([model hasItem:item inSectionWithIdentifier:sectionIdentifier]) { | 513 if ([model hasItem:item inSectionWithIdentifier:sectionIdentifier]) { |
| 514 [self.collectionViewController | 514 [self.collectionViewController |
| 515 reconfigureCellsForItems:@[ item ] | 515 reconfigureCellsForItems:@[ item ] |
| 516 inSectionWithIdentifier:sectionIdentifier]; | 516 inSectionWithIdentifier:sectionIdentifier]; |
| 517 } | 517 } |
| 518 } | 518 } |
| 519 } | 519 } |
| 520 | 520 |
| 521 @end | 521 @end |
| OLD | NEW |