Skip to content

Commit

Permalink
#1899 (dashboard)
Browse files Browse the repository at this point in the history
- More work on loading dashboard.
  • Loading branch information
Dejal committed Dec 24, 2024
1 parent d263613 commit 9a818dd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions clients/ios/Classes/DashList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Foundation

/// A list in the Dashboard.
@MainActor class DashList: Identifiable {
var id = UUID()
var index: Int

enum Side: String {
Expand Down
7 changes: 3 additions & 4 deletions clients/ios/Classes/FeedDetailDashListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,9 @@ struct DashListStoriesView: View {

var body: some View {
VStack(alignment: .center) {
Text("🚧")
.font(.system(size: 64))
Text("Coming Soon")
.padding()
ForEach(dash.stories) { story in
CardView(feedDetailInteraction: interaction, cache: cache, story: story)
}
}
.font(.custom("WhitneySSm-Medium", size: 14, relativeTo: .body))
.clipShape(RoundedRectangle(cornerRadius: 10))
Expand Down
5 changes: 4 additions & 1 deletion clients/ios/Classes/StoryCache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,16 @@ import Foundation

let dash = dashboard[index]

dash.id = UUID()
dash.folder = Self.folder
dash.feeds = Array(Self.feeds.values)

// if let feed = currentFeed, !dash.feeds.contains(feed) {
// dash.feeds.append(feed)
// }

dash.stories = before
dash.stories = Array(before.prefix(5))

print("Reloaded dashboard for \(index); folder: \(dash.folder?.name ?? "?"); feeds: \(dash.feeds); stories: \(dash.stories)")
}
}

0 comments on commit 9a818dd

Please sign in to comment.