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