Skip to content

Commit 74d7de5

Browse files
authored
Revert "Add announcements to home view (#195)" (#198)
This reverts commit 2d10756.
1 parent 2d10756 commit 74d7de5

4 files changed

Lines changed: 4 additions & 128 deletions

File tree

StikJIT/Resources/announcements.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

StikJIT/Utilities/AnnouncementManager.swift

Lines changed: 0 additions & 38 deletions
This file was deleted.

StikJIT/Views/AnnouncementCard.swift

Lines changed: 0 additions & 50 deletions
This file was deleted.

StikJIT/Views/HomeView.swift

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
import SwiftUI
99
import UniformTypeIdentifiers
1010

11-
// Load announcements from remote JSON
12-
import Foundation
13-
1411
extension UIDocumentPickerViewController {
1512
@objc func fix_init(forOpeningContentTypes contentTypes: [UTType], asCopy: Bool) -> UIDocumentPickerViewController {
1613
return fix_init(forOpeningContentTypes: contentTypes, asCopy: true)
@@ -35,8 +32,6 @@ struct HomeView: View {
3532
@State private var isImportingFile = false
3633
@State private var showingConsoleLogsView = false
3734
@State private var importProgress: Float = 0.0
38-
39-
@State private var announcements: [Announcement] = []
4035

4136
@State private var pidTextAlertShow = false
4237
@State private var pidStr = ""
@@ -65,23 +60,14 @@ struct HomeView: View {
6560
Text("Welcome to StikDebug \(username)!")
6661
.font(.system(.largeTitle, design: .rounded))
6762
.fontWeight(.bold)
68-
63+
6964
Text(pairingFileExists ? "Click connect to get started" : "Pick pairing file to get started")
7065
.font(.system(.subheadline, design: .rounded))
7166
.foregroundStyle(.secondary)
7267
.multilineTextAlignment(.center)
7368
}
7469
.padding(.top, 40)
75-
76-
if !announcements.isEmpty {
77-
VStack(spacing: 12) {
78-
ForEach(announcements) { announcement in
79-
AnnouncementCard(announcement: announcement)
80-
}
81-
}
82-
.padding(.horizontal, 20)
83-
}
84-
70+
8571
Button(action: {
8672

8773

@@ -217,14 +203,10 @@ struct HomeView: View {
217203
checkPairingFileExists()
218204
// Don't initialize specific color value when empty - empty means "use system theme"
219205
// This was causing the toggle to turn off when returning to settings
220-
206+
221207
// Initialize background color
222208
refreshBackground()
223-
224-
AnnouncementManager.fetchAnnouncements { loaded in
225-
announcements = loaded
226-
}
227-
209+
228210
// Add notification observer for showing pairing file picker
229211
NotificationCenter.default.addObserver(
230212
forName: NSNotification.Name("ShowPairingFilePicker"),

0 commit comments

Comments
 (0)