-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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 } |
There was a problem hiding this comment.
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 } |
There was a problem hiding this comment.
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
Changes made and design approved. Ready to merge at your go-ahead. |
* 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
* 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
This pull request adds many of the design changes from #196. There are still some tasks remaining, which are being tracked in #281.