Skip to content

Commit 0864b94

Browse files
committed
Небольшие правки
- Локализация для текста "Не удалось найти такого пользователя" - При отправке сообщения в чате показываем индикатор загрузки и скрываем клавиатуру - При открытии экрана поиска других пользователей с экрана "Сообщения" убираем лишнюю кнопку "Назад"
1 parent 3456377 commit 0864b94

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

SwiftUI-WorkoutApp.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@
856856
CLANG_TIDY_MISC_REDUNDANT_EXPRESSION = YES;
857857
CLANG_WARN_SEMICOLON_BEFORE_METHOD_BODY = YES;
858858
CODE_SIGN_STYLE = Automatic;
859-
CURRENT_PROJECT_VERSION = 8;
859+
CURRENT_PROJECT_VERSION = 9;
860860
DEVELOPMENT_ASSET_PATHS = "SwiftUI-WorkoutApp/Preview\\ Content/PreviewContent.swift SwiftUI-WorkoutApp/Preview\\ Content";
861861
DEVELOPMENT_TEAM = CR68PP2Z3F;
862862
ENABLE_PREVIEWS = YES;
@@ -907,7 +907,7 @@
907907
CLANG_TIDY_MISC_REDUNDANT_EXPRESSION = YES;
908908
CLANG_WARN_SEMICOLON_BEFORE_METHOD_BODY = YES;
909909
CODE_SIGN_STYLE = Automatic;
910-
CURRENT_PROJECT_VERSION = 8;
910+
CURRENT_PROJECT_VERSION = 9;
911911
DEVELOPMENT_ASSET_PATHS = "SwiftUI-WorkoutApp/Preview\\ Content/PreviewContent.swift SwiftUI-WorkoutApp/Preview\\ Content";
912912
DEVELOPMENT_TEAM = CR68PP2Z3F;
913913
ENABLE_PREVIEWS = YES;

SwiftUI-WorkoutApp/Resources/Localizable.xcstrings

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2371,6 +2371,17 @@
23712371
}
23722372
}
23732373
},
2374+
"Не удалось найти такого пользователя" : {
2375+
"extractionState" : "manual",
2376+
"localizations" : {
2377+
"en" : {
2378+
"stringUnit" : {
2379+
"state" : "translated",
2380+
"value" : "Could not find such a user"
2381+
}
2382+
}
2383+
}
2384+
},
23742385
"Не указан" : {
23752386
"extractionState" : "manual",
23762387
"localizations" : {

SwiftUI-WorkoutApp/Screens/Messages/DialogScreen.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ struct DialogScreen: View {
3838
sendMessageBar
3939
}
4040
}
41+
.loadingOverlay(if: isLoading)
4142
.background(Color.swBackground)
4243
.task(priority: .low) { await markAsRead() }
4344
.task(priority: .high) { await askForMessages() }
@@ -178,6 +179,7 @@ private extension DialogScreen {
178179

179180
func sendMessage() {
180181
isLoading = true
182+
isMessageBarFocused = false
181183
sendMessageTask = Task(priority: .userInitiated) {
182184
do {
183185
let userID = dialog.anotherUserID ?? 0

SwiftUI-WorkoutApp/Screens/Profile/SearchUsersScreen.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ struct SearchUsersScreen: View {
3838
.onSubmit(of: .search, search)
3939
.loadingOverlay(if: isLoading)
4040
.background(Color.swBackground)
41+
.navigationBarBackButtonHidden(mode == .chat)
4142
.toolbar {
4243
ToolbarItem(placement: .topBarLeading) {
4344
CloseButton(mode: .text) { dismiss() }
@@ -130,7 +131,7 @@ private extension SearchUsersScreen {
130131
.findUsers(with: query.withoutSpaces)
131132
users = foundUsers
132133
if foundUsers.isEmpty {
133-
SWAlert.shared.presentDefaultUIKit(message: "Не удалось найти такого пользователя")
134+
SWAlert.shared.presentDefaultUIKit(message: "Не удалось найти такого пользователя".localized)
134135
}
135136
} catch {
136137
SWAlert.shared.presentDefaultUIKit(message: error.localizedDescription)

SwiftUI-WorkoutApp/Screens/Root/RootScreen.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import SWDesignSystem
22
import SwiftUI
33

44
struct RootScreen: View {
5-
@Environment(\.userFlags) private var userFlags
65
@Binding var selectedTab: TabViewModel.Tab
76
let unreadCount: Int
87

0 commit comments

Comments
 (0)