Skip to content

Commit

Permalink
fix progress slider onEditingChanged randomly
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee Jun Kit committed Jun 5, 2021
1 parent 79188d5 commit 54878e6
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 6 deletions.
16 changes: 12 additions & 4 deletions Spottie.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -170,20 +170,21 @@
4730615D26565706001E3A1F /* Views */ = {
isa = PBXGroup;
children = (
4730616626565AF8001E3A1F /* Components */,
474BAFBD266B79900006EB16 /* Carousel */,
4730616626565AF8001E3A1F /* BottomBar */,
4730614F265656ED001E3A1F /* ContentView.swift */,
4730615E2656573B001E3A1F /* Sidebar.swift */,
473061602656580F001E3A1F /* Home.swift */,
4730616226565828001E3A1F /* Search.swift */,
4730616426565841001E3A1F /* Library.swift */,
4730616926565BB7001E3A1F /* BottomBar.swift */,
);
path = Views;
sourceTree = "<group>";
};
4730616626565AF8001E3A1F /* Components */ = {
4730616626565AF8001E3A1F /* BottomBar */ = {
isa = PBXGroup;
children = (
4730616926565BB7001E3A1F /* BottomBar.swift */,
470201C9265CF9380030ECA9 /* ShuffleButton.swift */,
4730616726565B03001E3A1F /* PlayPauseButton.swift */,
470201BE265BB4320030ECA9 /* PreviousTrackButton.swift */,
Expand All @@ -194,7 +195,7 @@
470201CD265DE8720030ECA9 /* TrackProgressSlider.swift */,
474BAFB7266876030006EB16 /* VolumeSlider.swift */,
);
path = Components;
path = BottomBar;
sourceTree = "<group>";
};
4730616B26565EB8001E3A1F /* Backend */ = {
Expand Down Expand Up @@ -275,6 +276,13 @@
path = API;
sourceTree = "<group>";
};
474BAFBD266B79900006EB16 /* Carousel */ = {
isa = PBXGroup;
children = (
);
path = Carousel;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down
2 changes: 1 addition & 1 deletion Spottie/ViewModels/PlayerViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Combine
class PlayerViewModel: PlayerStateProtocol {
@Published var volumePercent: Float = 0.0
@Published var isPlaying = false
@Published var durationMs = 0
@Published var durationMs = 1
@Published var progressMs = 0
@Published var trackName = ""
@Published var artistName = ""
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 15 additions & 1 deletion Spottie/Views/Search.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,22 @@
import SwiftUI

struct Search: View {
let rows: [GridItem] =
Array(repeating: .init(.fixed(20)), count: 2)
var body: some View {
Text("Hello, Search!")
ScrollView(.horizontal) {
LazyHGrid(rows: rows, alignment: .top) {
ForEach((0...79), id: \.self) {
let codepoint = $0 + 0x1f600
let codepointString = String(format: "%02X", codepoint)
Text("\(codepointString)")
.font(.footnote)
let emoji = String(Character(UnicodeScalar(codepoint)!))
Text("\(emoji)")
.font(.largeTitle)
}
}
}
}
}

Expand Down

0 comments on commit 54878e6

Please sign in to comment.