mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Update files following swiftformat upgrade
This commit is contained in:
committed by
Stefan Ceriu
parent
fe189fcfed
commit
23062901c0
@@ -130,7 +130,7 @@ struct HomeScreenViewState: BindableState {
|
||||
}
|
||||
}
|
||||
|
||||
// Used to hide all the rooms when the search field is focused and the query is empty
|
||||
/// Used to hide all the rooms when the search field is focused and the query is empty
|
||||
var shouldHideRoomList: Bool {
|
||||
bindings.isSearchFieldFocused && bindings.searchQuery.isEmpty
|
||||
}
|
||||
|
||||
@@ -29,7 +29,9 @@ private struct BloomModifier: ViewModifier {
|
||||
|
||||
@State private var height = CGFloat.zero
|
||||
|
||||
private var endPointY: CGFloat { hasSearchBar ? 0.35 : 0.55 }
|
||||
private var endPointY: CGFloat {
|
||||
hasSearchBar ? 0.35 : 0.55
|
||||
}
|
||||
|
||||
func body(content: Content) -> some View {
|
||||
content
|
||||
@@ -102,7 +104,9 @@ private struct OldBloomModifier: ViewModifier {
|
||||
return bloom
|
||||
}
|
||||
|
||||
private var endPointY: CGFloat { hasSearchBar ? 0.5 : 0.7 }
|
||||
private var endPointY: CGFloat {
|
||||
hasSearchBar ? 0.5 : 0.7
|
||||
}
|
||||
|
||||
private var bloomGradient: some View {
|
||||
LinearGradient(gradient: .compound.subtle,
|
||||
@@ -117,9 +121,9 @@ private struct OldBloomModifier: ViewModifier {
|
||||
bloom.colorScheme == colorScheme && bloom.baseColor == .compound.gradientSubtleStop1
|
||||
}
|
||||
|
||||
// This is a class to avoid a "Modifying state during view update" warning when storing
|
||||
// the result on the same run-loop - we want to avoid dispatching that to the next loop as
|
||||
// that can result in further (unnecessary) renders being made.
|
||||
/// This is a class to avoid a "Modifying state during view update" warning when storing
|
||||
/// the result on the same run-loop - we want to avoid dispatching that to the next loop as
|
||||
/// that can result in further (unnecessary) renders being made.
|
||||
class Bloom {
|
||||
var image: UIImage?
|
||||
var colorScheme: ColorScheme?
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
import Combine
|
||||
import Foundation
|
||||
|
||||
import MatrixRustSDK
|
||||
import OrderedCollections
|
||||
|
||||
|
||||
@@ -15,7 +15,9 @@ struct RoomListFiltersView: View {
|
||||
|
||||
/// When you connect a mouse on macOS the scrollbars aren't hidden. This is some extra padding
|
||||
/// applied to the scroll view content to make sure the bars don't overlap the filters.
|
||||
private var macScrollBarPadding: CGFloat { ProcessInfo.processInfo.isiOSAppOnMac ? 16 : 0 }
|
||||
private var macScrollBarPadding: CGFloat {
|
||||
ProcessInfo.processInfo.isiOSAppOnMac ? 16 : 0
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
ScrollViewReader { proxy in
|
||||
|
||||
@@ -92,7 +92,6 @@ struct HomeScreenInviteCell: View {
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var textualContent: some View {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text(title)
|
||||
|
||||
@@ -65,7 +65,6 @@ struct HomeScreenKnockedCell: View {
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var textualContent: some View {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text(title)
|
||||
|
||||
@@ -76,7 +76,6 @@ struct HomeScreenRoomCell: View {
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var header: some View {
|
||||
HStack(alignment: .top, spacing: 16) {
|
||||
Text(room.name)
|
||||
@@ -93,7 +92,6 @@ struct HomeScreenRoomCell: View {
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var footer: some View {
|
||||
HStack(alignment: .firstTextBaseline, spacing: 0) {
|
||||
ZStack(alignment: .topLeading) {
|
||||
|
||||
@@ -20,7 +20,6 @@ struct HomeScreenRoomList: View {
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var content: some View {
|
||||
ForEach(context.viewState.visibleRooms) { room in
|
||||
switch room.type {
|
||||
|
||||
Reference in New Issue
Block a user