Skip to content

Commit e731015

Browse files
authored
Поправил ширину на нескольких экранах (#320)
Если не задать максимальную ширину, то вьюха некрасиво анимирует свое расширение из пустого состояния в непустое
1 parent b27ebad commit e731015

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

SwiftUI-WorkoutApp/Screens/Common/FriendsListScreen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ struct FriendsListScreen: View {
1717
var body: some View {
1818
ScrollView {
1919
contentView
20-
.frame(maxWidth: .infinity)
2120
.animation(.default, value: currentState)
21+
.frame(maxWidth: .infinity)
2222
.padding()
2323
}
2424
.sheet(

SwiftUI-WorkoutApp/Screens/Profile/Journals/JournalEntriesScreen.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ struct JournalEntriesScreen: View {
2727
ScrollView {
2828
contentView
2929
.animation(.default, value: currentState)
30+
.frame(maxWidth: .infinity)
3031
.padding([.top, .horizontal])
3132
}
3233
.loadingOverlay(if: currentState.isLoading)

SwiftUI-WorkoutApp/Screens/Profile/Journals/JournalsListScreen.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ struct JournalsListScreen: View {
2323
ScrollView {
2424
contentView
2525
.animation(.default, value: currentState)
26+
.frame(maxWidth: .infinity)
2627
.padding([.top, .horizontal])
2728
.sheet(item: $journalToEdit, content: showSettingsSheet)
2829
}

SwiftUI-WorkoutApp/Screens/Profile/MainUserFriendsListScreen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ struct MainUserFriendsListScreen: View {
1616
var body: some View {
1717
ScrollView {
1818
contentView
19-
.frame(maxWidth: .infinity)
2019
.animation(.default, value: currentState)
20+
.frame(maxWidth: .infinity)
2121
.padding([.horizontal, .bottom])
2222
}
2323
.onChange(of: currentState) { newState in

0 commit comments

Comments
 (0)