Skip to content

Commit

Permalink
Song remove from memory bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
ctdewaters committed Jun 27, 2018
1 parent 22505cc commit 06dd4fe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Binary file not shown.
Expand Up @@ -69,6 +69,9 @@ class MemoryItemPropertiesViewController: UIViewController {
let delete = UIPreviewAction(title: "Remove From Memory", style: .destructive) { (action, viewController) in
self.memoryItem?.delete()

//Remove the media item in the items array.
MemoryViewController.shared?.memoryCollectionView.itemsArray = nil

//Reload the memory collection view.
MemoryViewController.shared?.memoryCollectionView.reload()
viewController.dismiss(animated: true, completion: nil)
Expand Down Expand Up @@ -123,6 +126,9 @@ class MemoryItemPropertiesViewController: UIViewController {

//Reload the memory collection view.
self.navigationController?.popViewController(animated: true)

//Remove the media item in the items array.
MemoryViewController.shared?.memoryCollectionView.itemsArray = nil
MemoryViewController.shared?.memoryCollectionView.reload()
}

Expand Down
2 changes: 1 addition & 1 deletion iOS/Memory/MemoryViewController.swift
Expand Up @@ -198,7 +198,7 @@ class MemoryViewController: UIViewController, UIGestureRecognizerDelegate {
self.memoryCollectionView.backgroundColor = Settings.shared.darkMode ? .black : .white

//Set the content inset of the collection view.
self.contentInset = self.maximumHeaderHeight - (Device() == .iPhoneX ? 35 : 20) - 100
self.contentInset = self.maximumHeaderHeight - (Device() == .iPhoneX ? 35 : 20) - 95
self.memoryCollectionView.contentInset.top = contentInset

//Update now playing UI state.
Expand Down

0 comments on commit 06dd4fe

Please sign in to comment.