Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import Foundation

@MainActor
final class MockAuthRepository: AuthRepository {
// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

private let validUsername = "gdeiassistant"
private let validPassword = "gdeiassistant"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ final class LoginViewModel: ObservableObject {
self.authManager = authManager
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

var currentDataSourceMode: DataSourceMode {
authManager.currentDataSourceMode
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import Foundation

@MainActor
final class MockCETRepository: CETRepository {
// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func fetchCaptchaImageBase64() async throws -> String {
try await Task.sleep(nanoseconds: 120_000_000)
return MockSeedData.cetCaptchaBase64
Expand Down
4 changes: 4 additions & 0 deletions GdeiAssistant-iOS/Features/CET/ViewModels/CETViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ final class CETViewModel: ObservableObject {
self.repository = repository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func loadIfNeeded() async {
guard dashboard == nil else { return }
await refreshCaptcha()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import Foundation

@MainActor
final class MockCardRepository: CardRepository {
// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

private var isReportedLoss = false

func fetchDashboard(on date: Date) async throws -> CampusCardDashboard {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ final class CardViewModel: ObservableObject {
self.repository = repository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func loadIfNeeded() async {
guard dashboard == nil else { return }
await loadDashboard()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import Foundation

@MainActor
final class MockChargeRepository: ChargeRepository {
// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func fetchCardInfo() async throws -> CampusCardDashboard {
try await Task.sleep(for: .milliseconds(250))
return CampusCardDashboard(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ final class ChargeViewModel: ObservableObject {
self.repository = repository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func loadIfNeeded() {
guard !hasLoaded else { return }
hasLoaded = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import Foundation

@MainActor
final class MockCollectionRepository: CollectionRepository {
// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

private var borrowedBooks: [CollectionBorrowItem] = [
CollectionBorrowItem(id: "c_borrow_1", sn: "sn_1001", code: "code_1001", title: "iOS 架构设计实践", author: "王磊", borrowDate: "2026-03-01", returnDate: "2026-03-22", renewCount: 0),
CollectionBorrowItem(id: "c_borrow_2", sn: "sn_1002", code: "code_1002", title: "数据库系统概论", author: "陈小华", borrowDate: "2026-02-24", returnDate: "2026-03-17", renewCount: 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ final class CollectionViewModel: ObservableObject {
self.repository = repository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func search() async {
let trimmed = FormValidationSupport.trimmed(keyword)
guard !trimmed.isEmpty else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import Foundation

@MainActor
final class MockCommunityRepository: CommunityRepository {
// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

private var likeCountOverrides: [String: Int] = [:]
private var commentCountOverrides: [String: Int] = [:]
private var addedComments: [String: [CommunityComment]] = [:]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ final class CommunityFeedViewModel: ObservableObject {
self.repository = repository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func loadIfNeeded() async {
guard !hasLoaded else { return }
await loadPosts()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ final class PostDetailViewModel: ObservableObject {
self.repository = repository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func loadIfNeeded() async {
guard detail == nil else { return }
await loadDetail()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ final class TopicFeedViewModel: ObservableObject {
self.repository = repository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func loadIfNeeded() async {
guard topic == nil && posts.isEmpty else { return }
await load()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import Foundation

@MainActor
final class MockDataCenterRepository: DataCenterRepository {
// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func queryElectricity(_ query: ElectricityQuery) async throws -> ElectricityBill {
try await Task.sleep(nanoseconds: 180_000_000)
guard FormValidationSupport.hasText(query.name), FormValidationSupport.hasText(query.studentNumber) else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ final class ElectricityFeesViewModel: ObservableObject {
self.repository = repository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

var availableYears: [Int] {
ElectricityQuery.yearOptions
}
Expand Down Expand Up @@ -53,6 +57,10 @@ final class YellowPageViewModel: ObservableObject {
self.repository = repository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func loadIfNeeded() async {
guard categories.isEmpty else { return }
await refresh()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ final class MockDatingRepository: DatingRepository {
myProfiles = Self.makeMyProfiles()
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func fetchProfiles(filter: DatingFilter) async throws -> [DatingProfile] {
hallProfiles.filter { $0.area == filter.area }
}
Expand Down
12 changes: 12 additions & 0 deletions GdeiAssistant-iOS/Features/Dating/ViewModels/DatingViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ final class DatingHallViewModel: ObservableObject {
self.repository = repository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func loadIfNeeded() async {
guard profiles.isEmpty else { return }
await refresh()
Expand Down Expand Up @@ -66,6 +70,10 @@ final class DatingCenterViewModel: ObservableObject {
self.repository = repository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func loadData() async {
isLoading = true
errorMessage = nil
Expand Down Expand Up @@ -126,6 +134,10 @@ final class PublishDatingViewModel: ObservableObject {
self.profileRepository = profileRepository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

var isFormValid: Bool {
!nickname.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty &&
selectedFaculty != ProfileFormSupport.unselectedOption &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import Foundation

@MainActor
final class MockDeliveryRepository: DeliveryRepository {
// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

private var orders: [DeliveryOrder] = [
DeliveryOrder(orderID: "delivery_001", displayName: "gdeiassistant", name: mockLocalizedText(simplifiedChinese: "代收", traditionalChinese: "代收", english: "Parcel pickup", japanese: "代理受取", korean: "대리수령"), pickupCode: "51233444567", contactPhone: "13800138000", price: 4.50, company: mockLocalizedText(simplifiedChinese: "菜鸟驿站", traditionalChinese: "菜鳥驛站", english: "Cainiao Station", japanese: "菜鳥ステーション", korean: "차이냐오 스테이션"), address: mockLocalizedText(simplifiedChinese: "南苑 3 栋 508", traditionalChinese: "南苑 3 棟 508", english: "South Court Bldg 3 Room 508", japanese: "南苑3棟508", korean: "남원 3동 508호"), state: .pending, remarks: mockLocalizedText(simplifiedChinese: "课后再送", traditionalChinese: "課後再送", english: "Deliver after class", japanese: "授業後にお願いします", korean: "수업 후 전달 부탁"), orderTime: mockLocalizedText(simplifiedChinese: "10分钟前", traditionalChinese: "10分鐘前", english: "10 min ago", japanese: "10分前", korean: "10분 전")),
DeliveryOrder(orderID: "delivery_002", displayName: "20230018", name: mockLocalizedText(simplifiedChinese: "代收", traditionalChinese: "代收", english: "Parcel pickup", japanese: "代理受取", korean: "대리수령"), pickupCode: "40399881234", contactPhone: "13911112222", price: 6.00, company: mockLocalizedText(simplifiedChinese: "东门快递点", traditionalChinese: "東門快遞點", english: "East Gate Parcel Point", japanese: "東門宅配受取所", korean: "동문 택배 보관소"), address: mockLocalizedText(simplifiedChinese: "北苑 6 栋 203", traditionalChinese: "北苑 6 棟 203", english: "North Court Bldg 6 Room 203", japanese: "北苑6棟203", korean: "북원 6동 203호"), state: .delivering, remarks: mockLocalizedText(simplifiedChinese: "到宿舍楼下联系", traditionalChinese: "到宿舍樓下聯繫", english: "Message me when you arrive downstairs", japanese: "寮の下に着いたら連絡してください", korean: "기숙사 아래 도착하면 연락 주세요"), orderTime: mockLocalizedText(simplifiedChinese: "40分钟前", traditionalChinese: "40分鐘前", english: "40 min ago", japanese: "40分前", korean: "40분 전"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ final class DeliveryViewModel: ObservableObject {
self.repository = repository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func loadIfNeeded() async {
guard orders.isEmpty else { return }
await refresh()
Expand Down Expand Up @@ -78,6 +82,10 @@ final class PublishDeliveryViewModel: ObservableObject {
self.repository = repository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

var isFormValid: Bool {
FormValidationSupport.hasText(pickupPlace) &&
FormValidationSupport.hasText(phone) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import Foundation

@MainActor
final class MockEvaluateRepository: EvaluateRepository {
// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func submit(_ submission: EvaluateSubmission) async throws {
try await Task.sleep(nanoseconds: 300_000_000)
_ = submission
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ final class EvaluateViewModel: ObservableObject {
self.repository = repository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func requestSubmit() {
showConfirm = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import Foundation

@MainActor
final class MockExpressRepository: ExpressRepository {
// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

private var posts: [ExpressPost] = [
ExpressPost(
id: "express_001",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ final class ExpressViewModel: ObservableObject {
self.repository = repository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func loadIfNeeded() async {
guard posts.isEmpty else { return }
await refresh()
Expand Down Expand Up @@ -93,6 +97,10 @@ final class PublishExpressViewModel: ObservableObject {
self.repository = repository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

var isFormValid: Bool {
FormValidationSupport.hasText(nickname) &&
FormValidationSupport.hasText(targetName) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import Foundation

@MainActor
final class MockGradeRepository: GradeRepository {
// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func fetchGrades(yearIndex: Int?) async throws -> GradeReport {
try await Task.sleep(nanoseconds: 280_000_000)
let index = yearIndex ?? 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ final class GradeViewModel: ObservableObject {
self.repository = repository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func loadIfNeeded() async {
if report == nil {
await loadGrades(yearIndex: Int(selectedYear))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import Foundation

@MainActor
final class MockGraduateExamRepository: GraduateExamRepository {
// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func queryScore(_ query: GraduateExamQuery) async throws -> GraduateExamScore {
try await Task.sleep(nanoseconds: 180_000_000)
guard FormValidationSupport.hasText(query.name), FormValidationSupport.hasText(query.examNumber), FormValidationSupport.hasText(query.idNumber) else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ final class GraduateExamViewModel: ObservableObject {
self.repository = repository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func submit() async {
guard FormValidationSupport.hasText(query.name), FormValidationSupport.hasText(query.examNumber), FormValidationSupport.hasText(query.idNumber) else {
errorMessage = localizedString("graduateExam.formIncomplete")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ final class HomeViewModel: ObservableObject {
self.now = now
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func loadIfNeeded() async {
if loadedScheduleDay != Self.campusCalendar.startOfDay(for: now()) {
await loadTodaySchedule()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import Foundation

@MainActor
final class MockLibraryRepository: LibraryRepository {
// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

private let validPasswords: Set<String> = ["library123", "123456"]
private var renewedRecordIDs: Set<String> = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ final class LibraryViewModel: ObservableObject {
self.repository = repository
}

// No actor-bound cleanup. Avoid the iOS 26.2 MainActor isolated-deinit
// back-deployment crash on synchronous release (swiftlang/swift#87316).
nonisolated deinit {}

func loadIfNeeded() async {
if books.isEmpty {
await searchBooks()
Expand Down
Loading
Loading