Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions flo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
B02A003F2F36662C0024E8EC /* UIScreen+.swift in Sources */ = {isa = PBXBuildFile; fileRef = B02A003E2F3666240024E8EC /* UIScreen+.swift */; };
B0BAAAA62F31F0A0002A5FBB /* RadiosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0BAAAA52F31F0A0002A5FBB /* RadiosView.swift */; };
B0BAAAA92F3213AF002A5FBB /* RadiosViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0BAAAA82F3213AB002A5FBB /* RadiosViewModel.swift */; };
B0BAAAAB2F3214F7002A5FBB /* Radio.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0BAAAAA2F3214F7002A5FBB /* Radio.swift */; };
Expand Down Expand Up @@ -82,6 +83,7 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
B02A003E2F3666240024E8EC /* UIScreen+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIScreen+.swift"; sourceTree = "<group>"; };
B0BAAAA52F31F0A0002A5FBB /* RadiosView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadiosView.swift; sourceTree = "<group>"; };
B0BAAAA82F3213AB002A5FBB /* RadiosViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadiosViewModel.swift; sourceTree = "<group>"; };
B0BAAAAA2F3214F7002A5FBB /* Radio.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Radio.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -213,6 +215,7 @@
C4289F4D2C1253EB00C3A4FD /* Utils */ = {
isa = PBXGroup;
children = (
B02A003E2F3666240024E8EC /* UIScreen+.swift */,
C456D8F92F2FF33B002AAB8B /* LRCParser.swift */,
C4F0B0A12F3A111100ABC002 /* AirPlayRoutePicker.swift */,
C415F5592C11953000E3E1D2 /* Constants.swift */,
Expand Down Expand Up @@ -450,6 +453,7 @@
C4100A6B2CE78B62001BC9BE /* Playlist.swift in Sources */,
C4A4BF332C14437700363290 /* LibraryView.swift in Sources */,
C46B8DD72CF4B89000B40644 /* Stats.swift in Sources */,
B02A003F2F36662C0024E8EC /* UIScreen+.swift in Sources */,
C4F0B0A22F3A111100ABC002 /* AirPlayRoutePicker.swift in Sources */,
C415F5642C11AA8700E3E1D2 /* Fonts.swift in Sources */,
C456D8FE2F300D3D002AAB8B /* LyricsView.swift in Sources */,
Expand Down
2 changes: 2 additions & 0 deletions flo/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ struct ContentView: View {
Spacer()

if playerViewModel.hasNowPlaying() && !playerViewModel.shouldHidePlayer {
let bottomPaddingForSmallerScreens: CGFloat = UIScreen.screenWidth <= 375 ? 32 : 0
FloatingPlayerView(viewModel: playerViewModel)
.padding(.bottom, 50)
.opacity(playerViewModel.hasNowPlaying() ? 1 : 0)
Expand Down Expand Up @@ -106,6 +107,7 @@ struct ContentView: View {
self.isSwipping = false
}
)
.padding(.bottom, bottomPaddingForSmallerScreens)
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions flo/Navigation/HomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ struct HomeView: View {
VStack(alignment: .leading, spacing: 16) {
Text("Listening Activity (all time)").customFont(.title2).fontWeight(.bold)
.multilineTextAlignment(.leading)

EqualHeightHStack(alignment: .top, spacing: 16) {

let statCardSpacing: CGFloat = UIScreen.screenWidth <= 375 ? 8 : 16

EqualHeightHStack(alignment: .top, spacing: statCardSpacing) {
EqualHeightItem {
StatCard(
title: "Total Listens",
Expand Down
10 changes: 10 additions & 0 deletions flo/Shared/Utils/UIScreen+.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// flo

import SwiftUI

extension UIScreen {
static let screenWidth = UIScreen.main.bounds.size.width
static let screenHeight = UIScreen.main.bounds.size.height
static let screenSize = UIScreen.main.bounds.size
}

6 changes: 6 additions & 0 deletions flo/StatCardView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ struct StatCard: View {
Text(title)
.foregroundColor(.secondary)
.customFont(.body)
.minimumScaleFactor(0.7)

Spacer()

Expand All @@ -60,13 +61,15 @@ struct StatCard: View {
.lineSpacing(2)
.fontWeight(.bold)
.lineLimit(2)
.minimumScaleFactor(0.7)

if let subtitle = subtitle {
Text(subtitle)
.foregroundColor(.secondary)
.customFont(.subheadline)
.lineSpacing(2)
.lineLimit(2)
.minimumScaleFactor(0.7)
}
}
}
Expand All @@ -81,6 +84,7 @@ struct StatCard: View {
Text(title)
.foregroundColor(.secondary)
.customFont(.body)
.minimumScaleFactor(0.7)

Spacer()

Expand All @@ -98,13 +102,15 @@ struct StatCard: View {
.lineSpacing(2)
.fontWeight(.bold)
.lineLimit(2)
.minimumScaleFactor(0.7)

if let subtitle = subtitle {
Text(subtitle)
.foregroundColor(.secondary)
.customFont(.subheadline)
.lineSpacing(2)
.lineLimit(2)
.minimumScaleFactor(0.7)
}
}
}
Expand Down