mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
View options, video details screen
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
extension CaseIterable where Self: Equatable {
|
||||
func next() -> Self {
|
||||
func next(nilAtEnd: Bool = false) -> Self! {
|
||||
let all = Self.allCases
|
||||
let index = all.firstIndex(of: self)!
|
||||
let next = all.index(after: index)
|
||||
|
||||
if nilAtEnd == true {
|
||||
if next == all.endIndex {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return all[next == all.endIndex ? all.startIndex : next]
|
||||
}
|
||||
}
|
||||
|
6
Extensions/TypedContentAccessors.swift
Normal file
6
Extensions/TypedContentAccessors.swift
Normal file
@@ -0,0 +1,6 @@
|
||||
import Siesta
|
||||
import SwiftyJSON
|
||||
|
||||
extension TypedContentAccessors {
|
||||
var json: JSON { typedContent(ifNone: JSON.null) }
|
||||
}
|
Reference in New Issue
Block a user