Skip to content

Commit 52fffbf

Browse files
committed
Cleanup
1 parent 3c6eb14 commit 52fffbf

File tree

13 files changed

+87
-174
lines changed

13 files changed

+87
-174
lines changed

Fosdem.xcodeproj/project.pbxproj

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
92CE31B128FC4A940073813E /* EventListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92CE31B028FC4A940073813E /* EventListView.swift */; };
4949
92D9E7B8291D7B9B007D203D /* HTMLFormattedText.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92D9E7B7291D7B9B007D203D /* HTMLFormattedText.swift */; };
5050
92D9E7BA291D95E1007D203D /* EventDetailHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92D9E7B9291D95E1007D203D /* EventDetailHeader.swift */; };
51+
92E5C1152D4820A60017CEE0 /* ListPredicateType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92E5C1142D4820A60017CEE0 /* ListPredicateType.swift */; };
5152
92F70AA02922B49A000BE6CB /* UrlHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92F70A9F2922B49A000BE6CB /* UrlHelper.swift */; };
5253
/* End PBXBuildFile section */
5354

@@ -116,6 +117,8 @@
116117
92CE31B028FC4A940073813E /* EventListView.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = EventListView.swift; sourceTree = "<group>"; };
117118
92D9E7B7291D7B9B007D203D /* HTMLFormattedText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HTMLFormattedText.swift; sourceTree = "<group>"; };
118119
92D9E7B9291D95E1007D203D /* EventDetailHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventDetailHeader.swift; sourceTree = "<group>"; };
120+
92E5C1142D4820A60017CEE0 /* ListPredicateType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListPredicateType.swift; sourceTree = "<group>"; };
121+
92E5C1162D4822DF0017CEE0 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
119122
92F70A9F2922B49A000BE6CB /* UrlHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UrlHelper.swift; sourceTree = "<group>"; };
120123
/* End PBXFileReference section */
121124

@@ -184,16 +187,14 @@
184187
925B0260298EAE0E00AFA83D /* LiveIcon.swift */,
185188
925B0262298EB2A400AFA83D /* VideoPlayer.swift */,
186189
9268D799298F251E0067A6B1 /* ListSettings.swift */,
187-
92BD1D2D2B5C345700DB8FC1 /* EventTypeIcon.swift */,
188-
92BD1D2F2B5C34F100DB8FC1 /* EventTypeColor.swift */,
189-
92BD1D312B5C374A00DB8FC1 /* TrackColor.swift */,
190190
);
191191
path = Views;
192192
sourceTree = "<group>";
193193
};
194194
14D2770C2205D07200740042 = {
195195
isa = PBXGroup;
196196
children = (
197+
92E5C1162D4822DF0017CEE0 /* README.md */,
197198
925F4A7C2B285A70007E9D1D /* Localizable.xcstrings */,
198199
92A57B392988FD1C00C0BB78 /* Package.swift */,
199200
92A2BDF92948CC5E0034864F /* FosdemTests.xctestplan */,
@@ -225,6 +226,10 @@
225226
14D277242205D07500740042 /* Assets.xcassets */,
226227
14D277292205D07500740042 /* Info.plist */,
227228
92C22E6129806F61006D7B5C /* privacy.md */,
229+
92E5C1142D4820A60017CEE0 /* ListPredicateType.swift */,
230+
92BD1D2D2B5C345700DB8FC1 /* EventTypeIcon.swift */,
231+
92BD1D2F2B5C34F100DB8FC1 /* EventTypeColor.swift */,
232+
92BD1D312B5C374A00DB8FC1 /* TrackColor.swift */,
228233
);
229234
path = Fosdem;
230235
sourceTree = "<group>";
@@ -474,6 +479,7 @@
474479
92F70AA02922B49A000BE6CB /* UrlHelper.swift in Sources */,
475480
9290384C2C9613FD002201FC /* ScheduleFetchingActor.swift in Sources */,
476481
92D9E7B8291D7B9B007D203D /* HTMLFormattedText.swift in Sources */,
482+
92E5C1152D4820A60017CEE0 /* ListPredicateType.swift in Sources */,
477483
142A87442224752E0034F6D7 /* EventType.swift in Sources */,
478484
92BD1D322B5C374A00DB8FC1 /* TrackColor.swift in Sources */,
479485
);
File renamed without changes.
File renamed without changes.

Fosdem/Import/XmlFinder.swift

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

Fosdem/ListPredicateType.swift

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
//
2+
// ListPredicateType.swift
3+
// Fosdem
4+
//
5+
// Created by Sean Molenaar on 27/01/2025.
6+
// Copyright © 2025 Sean Molenaar. All rights reserved.
7+
//
8+
9+
import Foundation
10+
11+
enum ListPredicateType {
12+
case person
13+
case room
14+
case track
15+
16+
static var all: [ListPredicateType] {
17+
return [.track, .person, .room]
18+
}
19+
20+
static func getName(_ type: ListPredicateType) -> String {
21+
switch type {
22+
case .person:
23+
return String(localized: "People")
24+
case .room:
25+
return String(localized: "Rooms")
26+
case .track:
27+
return String(localized: "Tracks")
28+
}
29+
}
30+
31+
static func getIcon(_ type: ListPredicateType) -> String {
32+
switch type {
33+
case .person:
34+
return "person"
35+
case .room:
36+
return "door.left.hand.open"
37+
case .track:
38+
return "road.lanes"
39+
}
40+
}
41+
}

Fosdem/Models/Event.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class Event {
2525

2626
public var room: Room
2727
public var track: Track!
28-
public var type: EventType?
28+
public var type: EventType!
2929

3030
public var userInfo: EventUserInfo?
3131

Fosdem/Models/Link.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ public class Link {
2121
public var isVideo: Bool {
2222
return type.contains(/video/) || name.lowercased().contains(/video recording/)
2323
}
24+
25+
@Transient
2426
public var isStreamableVideo: Bool {
2527
return url.absoluteString.contains(/\.mp4$/)
2628
}

Fosdem/Models/ManagedObjectProtocol.swift

Lines changed: 0 additions & 17 deletions
This file was deleted.
File renamed without changes.

Fosdem/Views/ListPredicate.swift

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

0 commit comments

Comments
 (0)