mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 13:37:11 +00:00
Cleanup various animations
This commit is contained in:
parent
d7ef0cdc30
commit
e11b09de3d
@ -107,7 +107,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
||||
|
||||
guard var room = self.state.rooms.first(where: { $0.id == roomSummary.id }) else {
|
||||
return HomeScreenRoom(id: roomSummary.id,
|
||||
displayName: roomSummary.displayName ?? roomSummary.name,
|
||||
displayName: roomSummary.displayName,
|
||||
topic: roomSummary.topic,
|
||||
lastMessage: lastMessage,
|
||||
avatar: roomSummary.avatar,
|
||||
|
@ -84,7 +84,7 @@ struct HomeScreen: View {
|
||||
EmptyView()
|
||||
}
|
||||
}
|
||||
.animation(.easeInOut, value: context.viewState.userAvatar)
|
||||
.animation(.default, value: context.viewState.userAvatar)
|
||||
.transition(.opacity)
|
||||
|
||||
ZStack {
|
||||
@ -96,7 +96,7 @@ struct HomeScreen: View {
|
||||
EmptyView()
|
||||
}
|
||||
}
|
||||
.animation(.easeInOut, value: context.viewState.userDisplayName)
|
||||
.animation(.default, value: context.viewState.userDisplayName)
|
||||
.transition(.opacity)
|
||||
}
|
||||
}
|
||||
@ -150,7 +150,7 @@ struct RoomCell: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.animation(.easeInOut, value: room)
|
||||
.animation(.default, value: room)
|
||||
.frame(minHeight: 60.0)
|
||||
.task {
|
||||
context.send(viewAction: .loadRoomData(roomIdentifier: room.id))
|
||||
|
@ -50,6 +50,7 @@ struct MessageComposerTextField: View {
|
||||
.background(placeholderView, alignment: .topLeading)
|
||||
.clipShape(rect)
|
||||
.overlay(rect.stroke(borderColor, lineWidth: borderWidth))
|
||||
.animation(.default, value: isEditing)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
|
@ -23,13 +23,13 @@ struct RoomScreen: View {
|
||||
var body: some View {
|
||||
VStack(spacing: 0.0) {
|
||||
TimelineView(context: context)
|
||||
.navigationTitle(context.viewState.roomTitle)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
MessageComposer(text: $context.composerText, disabled: context.viewState.sendButtonDisabled) {
|
||||
sendMessage()
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
.navigationTitle(context.viewState.roomTitle)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
}
|
||||
|
||||
private func sendMessage() {
|
||||
|
@ -38,7 +38,7 @@ struct EventBasedTimelineView: View {
|
||||
}
|
||||
.clipShape(Circle())
|
||||
.frame(width: 24.0, height: 24.0)
|
||||
.animation(.easeInOut, value: timelineItem.senderAvatar)
|
||||
.animation(.default, value: timelineItem.senderAvatar)
|
||||
}
|
||||
|
||||
private var firstLetter: String {
|
||||
|
@ -35,7 +35,7 @@ struct ImageRoomTimelineView: View {
|
||||
.aspectRatio(timelineItem.aspectRatio, contentMode: .fit)
|
||||
}
|
||||
}
|
||||
.animation(.easeInOut, value: timelineItem.image)
|
||||
.animation(.default, value: timelineItem.image)
|
||||
.frame(maxHeight: 1000.0)
|
||||
} else {
|
||||
VStack(alignment: .leading) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user