File tree Expand file tree Collapse file tree 2 files changed +28
-20
lines changed Expand file tree Collapse file tree 2 files changed +28
-20
lines changed Original file line number Diff line number Diff line change @@ -34,23 +34,3 @@ public protocol ProfileDetailRepresentable: ProfileElementRepresentable {
34
34
var lastActivity : Date { get }
35
35
var state : User . State { get }
36
36
}
37
-
38
- public extension ProfileElementRepresentable {
39
- var thumbnailUrl : URL ? {
40
- if let userIcon = userIcon {
41
- return userIcon
42
- }
43
- guard let url = avatarThumbnailUrl,
44
- let urlString = url. absoluteString. hasSuffix ( " 256 " )
45
- ? String ( url. absoluteString. dropLast ( 3 ) ) + " 512 "
46
- : avatarImageUrl? . absoluteString else { return nil }
47
- return URL ( string: urlString)
48
- }
49
-
50
- var userIconUrl : URL ? {
51
- if let userIcon = userIcon {
52
- return userIcon
53
- }
54
- return avatarThumbnailUrl
55
- }
56
- }
Original file line number Diff line number Diff line change
1
+ //
2
+ // ProfileImageURL.swift
3
+ // VRCKit
4
+ //
5
+ // Created by makinosp on 2024/08/04.
6
+ //
7
+
8
+ import Foundation
9
+
10
+ public extension ProfileElementRepresentable {
11
+ var thumbnailUrl : URL ? {
12
+ if let userIcon = userIcon {
13
+ return userIcon
14
+ }
15
+ guard let url = avatarThumbnailUrl,
16
+ let urlString = url. absoluteString. hasSuffix ( " 256 " )
17
+ ? String ( url. absoluteString. dropLast ( 3 ) ) + " 512 "
18
+ : avatarImageUrl? . absoluteString else { return nil }
19
+ return URL ( string: urlString)
20
+ }
21
+
22
+ var userIconUrl : URL ? {
23
+ if let userIcon = userIcon {
24
+ return userIcon
25
+ }
26
+ return avatarThumbnailUrl
27
+ }
28
+ }
You can’t perform that action at this time.
0 commit comments