Skip to content

Commit 439dd8d

Browse files
authored
Merge branch 'master' into peng-u-0807/lecture-reminder
2 parents 739600d + c29c7c5 commit 439dd8d

File tree

196 files changed

+6519
-1737
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+6519
-1737
lines changed

.cursor/rules/snutt-rule.mdc

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

.github/workflows/build-legacy.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
paths:
66
- "SNUTT-2022/**"
7-
- ".github/workflows/build.yml"
7+
- ".github/workflows/build-legacy.yml"
88

99
jobs:
1010
build-and-test:
@@ -14,19 +14,21 @@ jobs:
1414
strategy:
1515
fail-fast: false # if 'true' then one failed job cancels all jobs remaining
1616
matrix:
17-
# see https://github.com/actions/virtual-environments/blob/main/images/macos/macos-13-Readme.md for available versions
18-
xcode:
19-
- "16.1"
20-
macos: ["macos-15"]
21-
command: ["build", "test"]
17+
# see https://github.com/actions/virtual-environments/blob/main/images/macos/macos-15-Readme.md for available versions
18+
xcode: ["16.1"]
19+
macos: [macos-15]
20+
command: ["build"] # append "test" for executing test action
2221
scheme: ["SNUTT"]
2322

2423
steps:
25-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v4
2625

2726
- run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
2827

29-
- run: xcodebuild -showsdks
28+
- name: (Optional) Download iOS Simulator runtimes (18.x)
29+
run: |
30+
xcodebuild -downloadPlatform iOS
31+
xcodebuild -showsdks
3032
3133
- name: Populate DebugConfig.xcconfig from Secrets
3234
shell: bash
@@ -39,12 +41,14 @@ jobs:
3941
echo "$GOOGLE_SERVICE_RELEASE_INFO" > SNUTT-2022/SNUTT/GoogleServiceReleaseInfo.plist
4042
echo "$DEBUG_CONFIG" > SNUTT-2022/SNUTT/DebugConfig.xcconfig
4143
42-
- uses: mxcl/xcodebuild@v1.9.2
44+
- uses: mxcl/xcodebuild@v3
4345
with:
4446
platform: iOS
47+
platform-version: '^18'
4548
action: ${{ matrix.command }}
46-
code-coverage: true
4749
scheme: ${{ matrix.scheme }}
50+
code-coverage: true
4851
verbosity: xcpretty
4952
configuration: Debug
5053
working-directory: SNUTT-2022
54+
code-sign-identity: '-'

SNUTT-2022/SNUTT.xcodeproj/project.pbxproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@
5858
B863301A2CE4D70F008E9003 /* EnterNewPasswordView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B86330192CE4D70E008E9003 /* EnterNewPasswordView.swift */; };
5959
B8657C7E2E62BFAE004359E8 /* LectureReminderViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8657C7D2E62BFA5004359E8 /* LectureReminderViewModel.swift */; };
6060
B8657C802E62D34D004359E8 /* LectureReminderRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8657C7F2E62D346004359E8 /* LectureReminderRouter.swift */; };
61+
B8657C822E67B5F4004359E8 /* Toast.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8657C812E67B5F2004359E8 /* Toast.swift */; };
62+
B8657C832E67B5F4004359E8 /* Toast.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8657C812E67B5F2004359E8 /* Toast.swift */; };
63+
B86B67C52E4CA9F700682656 /* ToastView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B86B67C42E4CA9F700682656 /* ToastView.swift */; };
6164
B86C4CCF294DCA150019CE51 /* VerificationCodeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B86C4CCE294DCA150019CE51 /* VerificationCodeView.swift */; };
6265
B87431CB283B5A7300D78C59 /* BaseViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B87431CA283B5A7300D78C59 /* BaseViewModel.swift */; };
6366
B87B315D28D5A70F005C170B /* UserState.swift in Sources */ = {isa = PBXBuildFile; fileRef = B87B315828D5A70F005C170B /* UserState.swift */; };
@@ -424,6 +427,8 @@
424427
B86330192CE4D70E008E9003 /* EnterNewPasswordView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnterNewPasswordView.swift; sourceTree = "<group>"; };
425428
B8657C7D2E62BFA5004359E8 /* LectureReminderViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LectureReminderViewModel.swift; sourceTree = "<group>"; };
426429
B8657C7F2E62D346004359E8 /* LectureReminderRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LectureReminderRouter.swift; sourceTree = "<group>"; };
430+
B8657C812E67B5F2004359E8 /* Toast.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Toast.swift; sourceTree = "<group>"; };
431+
B86B67C42E4CA9F700682656 /* ToastView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastView.swift; sourceTree = "<group>"; };
427432
B86C4CCE294DCA150019CE51 /* VerificationCodeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VerificationCodeView.swift; sourceTree = "<group>"; };
428433
B87431CA283B5A7300D78C59 /* BaseViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseViewModel.swift; sourceTree = "<group>"; };
429434
B87B315828D5A70F005C170B /* UserState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserState.swift; sourceTree = "<group>"; };
@@ -1119,6 +1124,7 @@
11191124
738406ED2B57107C00007E62 /* Theme.swift */,
11201125
B84A4EA02B6035EE00C1E1A0 /* Building.swift */,
11211126
73B6E0862CCB34AA006DD4F0 /* SocialProvider.swift */,
1127+
B8657C812E67B5F2004359E8 /* Toast.swift */,
11221128
);
11231129
path = Models;
11241130
sourceTree = "<group>";
@@ -1213,6 +1219,7 @@
12131219
DCD41A6D27E5CDCA00CF380E /* Components */ = {
12141220
isa = PBXGroup;
12151221
children = (
1222+
B86B67C42E4CA9F700682656 /* ToastView.swift */,
12161223
BE98A009288A90C000C2CE95 /* Logo.swift */,
12171224
BEDF506C27EB740E00CDCC13 /* LectureList.swift */,
12181225
B8B22D1529311F6200AB88F3 /* EmptyLectureList.swift */,
@@ -1511,6 +1518,7 @@
15111518
BE419B87288B8B8F00FA9590 /* Weekday.swift in Sources */,
15121519
BE419B92288B8F9F00FA9590 /* TimetableBlock.swift in Sources */,
15131520
BE419B93288B8FA600FA9590 /* TimetableBlocksLayer.swift in Sources */,
1521+
B8657C832E67B5F4004359E8 /* Toast.swift in Sources */,
15141522
CEB5A72029DDA8B200E74C47 /* TimetableAccessoryInlineView.swift in Sources */,
15151523
BE98A069288AFC1600C2CE95 /* SNUTTWidgetBundle.swift in Sources */,
15161524
BE419B9B288B917A00FA9590 /* TimetableUtils.swift in Sources */,
@@ -1648,6 +1656,7 @@
16481656
B87DF6EF2914FC02008BB95B /* PopupRepository.swift in Sources */,
16491657
CE98204B2A09FBDD001037F5 /* DebugState.swift in Sources */,
16501658
BEB3B6AD28D4D40400E56062 /* EditableFields.swift in Sources */,
1659+
B86B67C52E4CA9F700682656 /* ToastView.swift in Sources */,
16511660
CE076E022A0967E200C9430B /* NetworkLogStore.swift in Sources */,
16521661
B87431CB283B5A7300D78C59 /* BaseViewModel.swift in Sources */,
16531662
BE13C5B528AE4CBA0081D0AB /* UserDefaultsRepository.swift in Sources */,
@@ -1717,6 +1726,7 @@
17171726
BE9413BB28C20DC500171060 /* AuthDto.swift in Sources */,
17181727
BE1B610C289D7C2500401361 /* GlobalUIService.swift in Sources */,
17191728
DC2915992865D69700FE5F9A /* LectureListViewModel.swift in Sources */,
1729+
B8657C822E67B5F4004359E8 /* Toast.swift in Sources */,
17201730
BEF9233628E7EE45004AFCB2 /* SignUpView.swift in Sources */,
17211731
B8F40EAF28980D990021A2A9 /* DeveloperInfoView.swift in Sources */,
17221732
DC1E0ECC28771B32005632A3 /* TimetableRepository.swift in Sources */,

SNUTT-2022/SNUTT/AppState/AppEnvironment.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ extension AppEnvironment {
8080
services.globalUIService.loadColorSchemeDuringBootstrap()
8181
services.timetableService.loadTimetableConfig()
8282
services.lectureService.fetchIsFirstBookmark()
83+
services.vacancyService.fetchIsFirstVacancy()
8384

8485
return .init(container: container)
8586
}

SNUTT-2022/SNUTT/AppState/States/ReviewState.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class WebViewPreloadManager {
1919
var webView: WKWebView?
2020
var eventSignal: PassthroughSubject<WebViewEventType, Never>?
2121
var coordinator: Coordinator?
22-
private var bag = Set<AnyCancellable>()
22+
private var cancellables = Set<AnyCancellable>()
2323

2424
func preload(url: URL, accessToken: String) {
2525
eventSignal = eventSignal ?? .init()
@@ -55,7 +55,7 @@ class WebViewPreloadManager {
5555
return
5656
}
5757
}
58-
.store(in: &bag)
58+
.store(in: &cancellables)
5959

6060
/// The `colorScheme` value can be quite unstable, especially during the SwiftUI lifecycle.
6161
/// To address this, we debounce it for 0.1 seconds.
@@ -69,7 +69,7 @@ class WebViewPreloadManager {
6969
return
7070
}
7171
}
72-
.store(in: &bag)
72+
.store(in: &cancellables)
7373
}
7474
}
7575

SNUTT-2022/SNUTT/AppState/States/RoutingState.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class ViewRoutingState {
1212
@Published var settingScene = SettingScene.RoutingState()
1313
@Published var timetableScene = TimetableScene.RoutingState()
1414
@Published var notificationList = NotificationList.RoutingState()
15+
@Published var bookmarkList = SearchLectureScene.RoutingState()
1516
}
1617

1718
extension SettingScene {
@@ -26,6 +27,12 @@ extension TimetableScene {
2627
}
2728
}
2829

30+
extension SearchLectureScene {
31+
struct RoutingState {
32+
var pushToBookmark = false
33+
}
34+
}
35+
2936
extension NotificationList {
3037
struct RoutingState {
3138
var lectureDetailRoutingInfo = LectureDetailRoutingInfo()

SNUTT-2022/SNUTT/AppState/States/SystemState.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class SystemState {
1818
@Published var preferredColorScheme: ColorScheme? = nil
1919

2020
@Published var selectedTab: TabType = .timetable
21+
22+
@Published var toast: Toast? = nil
2123

2224
@Published var noticeViewInfo: ConfigsDto.NoticeViewInfoDto?
2325

SNUTT-2022/SNUTT/AppState/States/ThemeState.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ThemeMarketViewPreloadManager {
2828
var webView: WKWebView?
2929
var eventSignal: PassthroughSubject<ThemeMarketViewEventType, Never>?
3030
var coordinator: Coordinator?
31-
private var bag = Set<AnyCancellable>()
31+
private var cancellables = Set<AnyCancellable>()
3232

3333
func preload(url: URL, accessToken: String) {
3434
eventSignal = eventSignal ?? .init()
@@ -64,7 +64,7 @@ class ThemeMarketViewPreloadManager {
6464
return
6565
}
6666
}
67-
.store(in: &bag)
67+
.store(in: &cancellables)
6868

6969
/// The `colorScheme` value can be quite unstable, especially during the SwiftUI lifecycle.
7070
/// To address this, we debounce it for 0.1 seconds.
@@ -78,7 +78,7 @@ class ThemeMarketViewPreloadManager {
7878
return
7979
}
8080
}
81-
.store(in: &bag)
81+
.store(in: &cancellables)
8282
}
8383
}
8484

0 commit comments

Comments
 (0)