Skip to content

Commit c38e4bd

Browse files
authored
CONFIG: Migrate to Travis (#4)
* CONFIG: Migrate to Travis
1 parent 9df1e12 commit c38e4bd

File tree

7 files changed

+42
-25
lines changed

7 files changed

+42
-25
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.travis.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
os: osx
2+
osx_image: xcode11.4
3+
language: generic
4+
5+
branches:
6+
only:
7+
- master
8+
9+
addons:
10+
homebrew:
11+
packages:
12+
- swiftlint
13+
14+
env:
15+
- SWIFT_VERSION=5.2
16+
17+
script:
18+
- set -o pipefail
19+
- swiftlint
20+
- swift build
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//
2+
// AnyTransition+Image.swift
3+
// TMDbSwiftUI
4+
//
5+
// Created by Adam Young on 18/04/2020.
6+
//
7+
8+
import SwiftUI
9+
10+
extension AnyTransition {
11+
12+
static let fadeIn: AnyTransition = AnyTransition.opacity.animation(Animation.easeOut.speed(0.5))
13+
14+
}

Sources/TMDbSwiftUI/Views/BackdropImage.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,17 @@ public struct BackdropImage: View {
2222

2323
public var body: some View {
2424
Group {
25-
if configurationManager.imagesConfiguration != nil {
25+
if path?.scheme != nil {
26+
WebImage(url: path)
27+
.resizable()
28+
} else if configurationManager.imagesConfiguration != nil {
2629
WebImage(url: configurationManager.imagesConfiguration?.imageURL(forBackdropPath: self.path))
2730
.resizable()
28-
.transition(.fade)
2931
} else {
3032
EmptyView()
3133
}
3234
}
35+
.transition(.fadeIn)
3336
.scaledToFill()
3437
.onAppear(perform: fetchConfiguration)
3538
}

Sources/TMDbSwiftUI/Views/PersonProfileImage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ public struct PersonProfileImage: View {
4242
WebImage(url: configurationManager.imagesConfiguration?.imageURL(forPersonProfilePath: self.path, size: self.size))
4343
.resizable()
4444
.placeholder { placeholder }
45-
.transition(.fade)
4645
} else {
4746
placeholder
4847
}
4948
}
49+
.transition(.fadeIn)
5050
.scaledToFill()
5151
.frame(width: size, height: size)
5252
.clipped()

Sources/TMDbSwiftUI/Views/PosterImage.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public struct PosterImage: View {
3838
placeholder
3939
}
4040
}
41+
.transition(.fadeIn)
4142
.scaledToFill()
4243
.frame(width: size, height: (size * 1.5))
4344
.cornerRadius(size / 50)

Sources/TMDbSwiftUI/Views/StillImage.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public struct StillImage: View {
3636
placeholder
3737
}
3838
}
39+
.transition(.fadeIn)
3940
.scaledToFill()
4041
.frame(width: size, height: (size / 2))
4142
.cornerRadius(size / 50)

0 commit comments

Comments
 (0)