Skip to content
Merged
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
14 changes: 0 additions & 14 deletions frontend/MusicApp/ViewModels/AppState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,8 @@ enum AppScreen {
case main
}

enum ActiveTab: String, CaseIterable {
case pulse = "pulse"
case charts = "charts"
case profile = "profile"
case social = "social"
case notifications = "notifications"
}

class AppState: ObservableObject {
@Published var currentScreen: AppScreen = .splash
@Published var activeTab: ActiveTab = .pulse
@Published var hasCompletedOnboarding: Bool = false
@Published var isAuthenticated: Bool = false
@Published var currentUser: User?
Expand Down Expand Up @@ -91,11 +82,6 @@ class AppState: ObservableObject {
KeychainHelper.clearAll()
currentScreen = .authentication
}

@MainActor
func setActiveTab(_ tab: ActiveTab) {
activeTab = tab
}
}

extension AppState {
Expand Down
24 changes: 1 addition & 23 deletions frontend/MusicApp/ViewModels/HomeFeedViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,9 @@ import Foundation
import Combine
import SwiftUI

enum FeedFilter: String, CaseIterable {
case trending = "trending"
case forYou = "forYou"
case following = "following"

var displayName: String {
switch self {
case .trending: return "Trending"
case .forYou: return "For You"
case .following: return "Following"
}
}
}

@MainActor
class HomeFeedViewModel: ObservableObject {
@Published var feedItems: [MusicItem] = []
@Published var activeFilter: FeedFilter = .trending
@Published var isLoading: Bool = false
@Published var errorMessage: String?
@Published var selectedItem: MusicItem?
Expand All @@ -36,21 +21,14 @@ class HomeFeedViewModel: ObservableObject {
errorMessage = nil

do {
feedItems = try await musicService.getFeed(filter: activeFilter.rawValue)
feedItems = try await musicService.getFeed(filter: "forYou")
} catch {
errorMessage = error.localizedDescription
}

isLoading = false
}

func setFilter(_ filter: FeedFilter) {
activeFilter = filter
Task {
await loadFeed()
}
}

func selectItemForRating(_ item: MusicItem) {
selectedItem = item
showRatingModal = true
Expand Down
98 changes: 0 additions & 98 deletions frontend/MusicApp/Views/BottomNavView.swift

This file was deleted.

216 changes: 0 additions & 216 deletions frontend/MusicApp/Views/GlobalRankingsView.swift

This file was deleted.

Loading