Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update design of video queue #282

Merged
merged 32 commits into from
Feb 8, 2017
Merged

Update design of video queue #282

merged 32 commits into from
Feb 8, 2017

Conversation

glennrfisher
Copy link
Contributor

This pull request adds many of the design changes from #196. There are still some tasks remaining, which are being tracked in #281.

Copy link
Member

@dfirsht dfirsht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor style suggestion. Also can you confirm that you have design approval?

@@ -654,70 +699,60 @@ extension StreamViewController: UITableViewDelegate, UITableViewDataSource {
if isKeyboardShowing {
visualEffectView.isHidden = false
dismissView.isHidden = false
}
else {
} else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha surprised this hasn't come up before. I've always put it on a different line for spacing but I can see why some people prefer same line

}
}

func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
if editingStyle == .delete, indexPath.row != viewModel.currentVideoIndex {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok to delete indexPath.row != viewModel.currentVideoIndex only because of the canEdit method.

return
}
guard let currentVideoIndex = viewModel.currentVideoIndex else { return }
guard let video = viewModel.videoQueue?.remove(at: sourceIndexPath.row) else { return }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can combine with above guard statement and use line breaks.

playerView.playVideo()
}
guard viewModel.currentVideoIndex != indexPath.row else { return }
guard let currentVideoIndex = viewModel.currentVideoIndex else { return }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

# Conflicts:
#	iOS/Stormtrooper/Stormtrooper/Storyboards/Stream.storyboard
#	iOS/Stormtrooper/Stormtrooper/Views/VideoQueueTableViewCell.xib
@glennrfisher
Copy link
Contributor Author

Changes made and design approved. Ready to merge at your go-ahead.

@dfirsht dfirsht merged commit 7a1d09c into develop Feb 8, 2017
@dfirsht dfirsht deleted the video-queue branch February 8, 2017 21:07
dfirsht pushed a commit that referenced this pull request Feb 28, 2017
* Change “UP NEXT” to “QUEUE”

* Update VideoQueueTableViewCell

* Add play icon to assets

* Update cellFor(queueTableView:at:)

* Set background color of content view

* Change separator color for queue table view

* Improve comments

* Hide separator for current video

* Change number property from Int? to String?

* Make current video editable

* Set selection style to none

* Update highlighted color

* Highlight background of current video when editing

* Start counting videos from 1 instead of 0

* Swap highlighting when a new video is selected

* Swap highlight when video ends

* Update comments and formatting

* Reset background color and separator when no longer the current video

* Hide separator of previous video

* Code cleanup

* Update row numbering after moving a video

* Reload rows to update video numbers

* Remove row numbering for now

* Scroll to current video when showing the queue

* Add helper function to highlight/unhighlight

* Set previous video when loading cells

* Add support for deleting the current video

* Code cleanup — use switch instead of if/else

* Remove ability to delete the current video

* Remove video cell numbers and play icon

* Update guard statements
dfirsht pushed a commit that referenced this pull request Mar 9, 2017
* Change “UP NEXT” to “QUEUE”

* Update VideoQueueTableViewCell

* Add play icon to assets

* Update cellFor(queueTableView:at:)

* Set background color of content view

* Change separator color for queue table view

* Improve comments

* Hide separator for current video

* Change number property from Int? to String?

* Make current video editable

* Set selection style to none

* Update highlighted color

* Highlight background of current video when editing

* Start counting videos from 1 instead of 0

* Swap highlighting when a new video is selected

* Swap highlight when video ends

* Update comments and formatting

* Reset background color and separator when no longer the current video

* Hide separator of previous video

* Code cleanup

* Update row numbering after moving a video

* Reload rows to update video numbers

* Remove row numbering for now

* Scroll to current video when showing the queue

* Add helper function to highlight/unhighlight

* Set previous video when loading cells

* Add support for deleting the current video

* Code cleanup — use switch instead of if/else

* Remove ability to delete the current video

* Remove video cell numbers and play icon

* Update guard statements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants