mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Previews environment objects fixtures
This commit is contained in:
@@ -47,4 +47,13 @@ extension Video {
|
||||
static var allFixtures: [Video] {
|
||||
[fixture, fixtureLiveWithoutPublishedOrViews, fixtureUpcomingWithoutPublishedOrViews]
|
||||
}
|
||||
|
||||
static func fixtures(_ count: Int) -> [Video] {
|
||||
var result = [Video]()
|
||||
while result.count < count {
|
||||
result.append(allFixtures.shuffled().first!)
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user