mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-26 02:01:02 +00:00
Swiftformat .
This commit is contained in:
parent
4af78478ba
commit
a4910037b8
18 changed files with 67 additions and 70 deletions
|
@ -112,7 +112,7 @@ struct IceCubesApp: App {
|
|||
popToRootTab: $popToRootTab,
|
||||
tabs: availableTabs,
|
||||
routerPath: sidebarRouterPath) {
|
||||
GeometryReader { proxy in
|
||||
GeometryReader { _ in
|
||||
HStack(spacing: 0) {
|
||||
ZStack {
|
||||
if selectedTab == .profile {
|
||||
|
|
|
@ -69,7 +69,7 @@ extension AppQLPreviewController: QLPreviewControllerDelegate {
|
|||
dismiss(animated: true)
|
||||
}
|
||||
|
||||
func previewControllerDidDismiss(_ controller: QLPreviewController) {
|
||||
func previewControllerDidDismiss(_: QLPreviewController) {
|
||||
dismiss(animated: true)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ struct SwipeActionsSettingsView: View {
|
|||
var body: some View {
|
||||
Form {
|
||||
Section {
|
||||
|
||||
Label("settings.swipeactions.status.leading", systemImage: "arrow.right")
|
||||
.foregroundColor(.secondary)
|
||||
|
||||
|
@ -17,7 +16,7 @@ struct SwipeActionsSettingsView: View {
|
|||
label: "settings.swipeactions.primary")
|
||||
.onChange(of: userPreferences.swipeActionsStatusLeadingLeft) { action in
|
||||
if action == .none {
|
||||
userPreferences.swipeActionsStatusLeadingRight = .none;
|
||||
userPreferences.swipeActionsStatusLeadingRight = .none
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,7 +31,7 @@ struct SwipeActionsSettingsView: View {
|
|||
label: "settings.swipeactions.primary")
|
||||
.onChange(of: userPreferences.swipeActionsStatusTrailingRight) { action in
|
||||
if action == .none {
|
||||
userPreferences.swipeActionsStatusTrailingLeft = .none;
|
||||
userPreferences.swipeActionsStatusTrailingLeft = .none
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -82,5 +81,4 @@ struct SwipeActionsSettingsView: View {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -197,7 +197,7 @@ struct AccountDetailHeaderView: View {
|
|||
if account.bot {
|
||||
Text("🤖")
|
||||
}
|
||||
if account.locked{
|
||||
if account.locked {
|
||||
Text("🔒")
|
||||
}
|
||||
Image(systemName: "calendar")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import UIKit
|
||||
import SwiftUI
|
||||
import DesignSystem
|
||||
import SwiftUI
|
||||
import UIKit
|
||||
|
||||
extension ButtonStyle where Self == StatusActionButtonStyle {
|
||||
static func statusAction(isOn: Bool = false, tintColor: Color? = nil) -> Self {
|
||||
|
@ -98,14 +98,14 @@ struct StatusActionButtonStyle: ButtonStyle {
|
|||
|
||||
static func generateCells() -> [Cell] {
|
||||
let cellCount = 16
|
||||
let velocityRange = 0.6...1.0
|
||||
let scaleRange = 0.5...1.0
|
||||
let alphaRange = 0.6...1.0
|
||||
let velocityRange = 0.6 ... 1.0
|
||||
let scaleRange = 0.5 ... 1.0
|
||||
let alphaRange = 0.6 ... 1.0
|
||||
|
||||
let spacing = 2 * .pi/(1.618 + Double(arc4random() % 200) / 10000)
|
||||
let spacing = 2 * .pi / (1.618 + Double(arc4random() % 200) / 10000)
|
||||
let initialSpacing = deg2rad(Double(arc4random() % 360))
|
||||
return (0..<cellCount).map { index in
|
||||
return Cell(
|
||||
return (0 ..< cellCount).map { index in
|
||||
Cell(
|
||||
id: index,
|
||||
angle: initialSpacing + spacing * Double(index),
|
||||
velocity: random(within: velocityRange),
|
||||
|
@ -116,7 +116,7 @@ struct StatusActionButtonStyle: ButtonStyle {
|
|||
}
|
||||
|
||||
static func random(within range: ClosedRange<Double>) -> Double {
|
||||
Double(arc4random()) / 0xFFFFFFFF * (range.upperBound - range.lowerBound) + range.lowerBound
|
||||
Double(arc4random()) / 0xFFFF_FFFF * (range.upperBound - range.lowerBound) + range.lowerBound
|
||||
}
|
||||
|
||||
static func deg2rad(_ number: Double) -> Double {
|
||||
|
@ -124,5 +124,3 @@ struct StatusActionButtonStyle: ButtonStyle {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ public struct StatusRowView: View {
|
|||
.accessibilityAction {
|
||||
viewModel.navigateToDetail()
|
||||
}
|
||||
if viewModel.showActions, (viewModel.isFocused || theme.statusActionsDisplay != .none), !isInCaptureMode {
|
||||
if viewModel.showActions, viewModel.isFocused || theme.statusActionsDisplay != .none, !isInCaptureMode {
|
||||
StatusRowActionsView(viewModel: viewModel)
|
||||
.padding(.top, 8)
|
||||
.tint(viewModel.isFocused ? theme.tintColor : .gray)
|
||||
|
|
|
@ -27,7 +27,8 @@ public struct StatusRowMediaPreviewView: View {
|
|||
|
||||
var availableWidth: CGFloat {
|
||||
if UIDevice.current.userInterfaceIdiom == .phone &&
|
||||
(UIDevice.current.orientation == .landscapeLeft || UIDevice.current.orientation == .landscapeRight) || theme.statusDisplayStyle == .medium {
|
||||
(UIDevice.current.orientation == .landscapeLeft || UIDevice.current.orientation == .landscapeRight) || theme.statusDisplayStyle == .medium
|
||||
{
|
||||
return sceneDelegate.windowWidth * 0.80
|
||||
}
|
||||
return sceneDelegate.windowWidth
|
||||
|
|
Loading…
Reference in a new issue