Skip to content

Commit

Permalink
New error code
Browse files Browse the repository at this point in the history
  • Loading branch information
vince-hz committed Feb 21, 2024
1 parent 42335fc commit 81f58fe
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions Flat/Api/Core/FlatServerError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ enum FlatApiError: Int, LocalizedError, CaseIterable {
case RoomReachLimit = 210_002
case RoomNotBegin = 210_004
case RoomCreateLimit = 210_005
case RoomNotBeginAndAddList = 210_006

case PeriodicNotFound = 300_000
case PeriodicIsEnded
Expand Down
2 changes: 1 addition & 1 deletion Flat/Modules/ClassRoom/ClassroomCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class ClassroomCoordinator: NSObject {
controller?.showAlertWith(message: error.localizedDescription)

if let flatError = error as? FlatApiError {
if flatError == .RoomNotBegin {
if flatError == .RoomNotBeginAndAddList {
NotificationCenter.default.post(name: classRoomListNeedRefreshNotificationName, object: nil)
}
}
Expand Down
3 changes: 3 additions & 0 deletions Flat/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,9 @@
"RoomNotBegin" = "Room not started, accessible 5 minutes before class starts";


"RoomNotBeginAndAddList" = "Room not started, accessible 5 minutes before class starts, room added to room list";


"RoomNotFound" = "Room does not exist";


Expand Down
3 changes: 3 additions & 0 deletions Flat/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,9 @@
"RoomNotBegin" = "房间未开始,开课前 5 分钟可进入";


"RoomNotBeginAndAddList" = "房间未开始,开课前 5 分钟可进入,已将该房间添加到房间列表";


"RoomNotFound" = "房间不存在";


Expand Down

0 comments on commit 81f58fe

Please sign in to comment.