Skip to content

Commit

Permalink
Clean unused files
Browse files Browse the repository at this point in the history
  • Loading branch information
hartlco committed Dec 21, 2021
1 parent 7b4cff9 commit 8dd078a
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 193 deletions.
5 changes: 2 additions & 3 deletions Icro-Playground.swiftpm/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ struct ContentView: View {
Image(systemName: "globe")
.imageScale(.large)
.foregroundColor(.accentColor)
Button {
Button {
print("button print")
} label: {
} label: {
Text("Button Text")
}

Text("Hello, world!")
}
}
Expand Down
2 changes: 1 addition & 1 deletion Icro-Playground.swiftpm/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ let package = Package(
]
)
]
)
)
12 changes: 0 additions & 12 deletions Icro.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,16 @@
C5046524274F77C60004B812 /* LocalizedString.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BC1384221C6332B0040353C /* LocalizedString.swift */; };
C5046525274F77C60004B812 /* Font+Settings.swift in Sources */ = {isa = PBXBuildFile; fileRef = C550D77F2740F79000E10CF6 /* Font+Settings.swift */; };
C5046526274F77C60004B812 /* SingleImageCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BC1820520790C930061F261 /* SingleImageCollectionViewCell.swift */; };
C5046527274F77C60004B812 /* FakeTableCellButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B2A5A7920A6196700B54399 /* FakeTableCellButton.swift */; };
C5046529274F77C60004B812 /* LinkLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B3C79AC21C4E58B00F699B8 /* LinkLabel.swift */; };
C504652A274F77C60004B812 /* ItemCellConfigurator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B583720212861220076121E /* ItemCellConfigurator.swift */; };
C504652D274F77C60004B812 /* KeyboardLayoutGuide.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B3C79D521C52D2C00F699B8 /* KeyboardLayoutGuide.swift */; };
C504652E274F77C60004B812 /* ItemTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BE9455D2079EFCE004F9FF4 /* ItemTableViewCell.swift */; };
C504652F274F77C60004B812 /* UIViewController+Loading.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA6D1782087ACF900F484B2 /* UIViewController+Loading.swift */; };
C5046534274F77C70004B812 /* VideoThumbnailImageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BD2FE672259E0DC00591490 /* VideoThumbnailImageProvider.swift */; };
C5046535274F77C70004B812 /* LocalizedString.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BC1384221C6332B0040353C /* LocalizedString.swift */; };
C5046536274F77C70004B812 /* Font+Settings.swift in Sources */ = {isa = PBXBuildFile; fileRef = C550D77F2740F79000E10CF6 /* Font+Settings.swift */; };
C5046537274F77C70004B812 /* SingleImageCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BC1820520790C930061F261 /* SingleImageCollectionViewCell.swift */; };
C5046538274F77C70004B812 /* FakeTableCellButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B2A5A7920A6196700B54399 /* FakeTableCellButton.swift */; };
C504653A274F77C70004B812 /* LinkLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B3C79AC21C4E58B00F699B8 /* LinkLabel.swift */; };
C504653B274F77C70004B812 /* ItemCellConfigurator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B583720212861220076121E /* ItemCellConfigurator.swift */; };
C504653E274F77C70004B812 /* KeyboardLayoutGuide.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B3C79D521C52D2C00F699B8 /* KeyboardLayoutGuide.swift */; };
C504653F274F77C70004B812 /* ItemTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BE9455D2079EFCE004F9FF4 /* ItemTableViewCell.swift */; };
C5046540274F77C70004B812 /* UIViewController+Loading.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA6D1782087ACF900F484B2 /* UIViewController+Loading.swift */; };
C5046547274F78460004B812 /* ItemNavigatorProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B3C79C521C51B4900F699B8 /* ItemNavigatorProtocol.swift */; };
Expand Down Expand Up @@ -261,7 +257,6 @@
5B20952422F6B14E00C06123 /* CatalystToolbar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CatalystToolbar.swift; path = Helper/CatalystToolbar.swift; sourceTree = "<group>"; };
5B28C8C422C732F900A46C52 /* AcknowledgementView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AcknowledgementView.swift; path = View/Settings/AcknowledgementView.swift; sourceTree = "<group>"; };
5B28C8CF22C89B2600A46C52 /* UserListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = UserListView.swift; path = View/UserListView.swift; sourceTree = "<group>"; };
5B2A5A7920A6196700B54399 /* FakeTableCellButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeTableCellButton.swift; sourceTree = "<group>"; };
5B2B817422F6CC2E0073B393 /* appversion.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = appversion.xcconfig; sourceTree = "<group>"; };
5B38476021FE035900F082AD /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; };
5B38476821FE073800F082AD /* UIView+Contraints.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "UIView+Contraints.swift"; path = "Helper/UIView+Contraints.swift"; sourceTree = "<group>"; };
Expand All @@ -276,7 +271,6 @@
5B3C79AC21C4E58B00F699B8 /* LinkLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkLabel.swift; sourceTree = "<group>"; };
5B3C79C121C518B700F699B8 /* MainNavigator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = MainNavigator.swift; path = Navigator/MainNavigator.swift; sourceTree = "<group>"; };
5B3C79C521C51B4900F699B8 /* ItemNavigatorProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemNavigatorProtocol.swift; sourceTree = "<group>"; };
5B3C79D521C52D2C00F699B8 /* KeyboardLayoutGuide.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardLayoutGuide.swift; sourceTree = "<group>"; };
5B44C71620979CF20003B35D /* MuteViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = MuteViewModel.swift; path = ViewModel/MuteViewModel.swift; sourceTree = "<group>"; };
5B4639DC2168FE9B00200D8F /* TabViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabViewController.swift; sourceTree = "<group>"; };
5B4639DE216901BE00200D8F /* SplitViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplitViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -632,7 +626,6 @@
isa = PBXGroup;
children = (
5BC1820520790C930061F261 /* SingleImageCollectionViewCell.swift */,
5B2A5A7920A6196700B54399 /* FakeTableCellButton.swift */,
5BE9455D2079EFCE004F9FF4 /* ItemTableViewCell.swift */,
5B3C79AC21C4E58B00F699B8 /* LinkLabel.swift */,
C55BAF28275D489D009E8A9C /* ComposeKeyboardInputView.swift */,
Expand All @@ -644,7 +637,6 @@
isa = PBXGroup;
children = (
5BA6D1782087ACF900F484B2 /* UIViewController+Loading.swift */,
5B3C79D521C52D2C00F699B8 /* KeyboardLayoutGuide.swift */,
5BC1384221C6332B0040353C /* LocalizedString.swift */,
5BD2FE672259E0DC00591490 /* VideoThumbnailImageProvider.swift */,
C550D77F2740F79000E10CF6 /* Font+Settings.swift */,
Expand Down Expand Up @@ -1287,7 +1279,6 @@
5B3C798121C4DFAF00F699B8 /* ShareViewController.swift in Sources */,
C589570B27500B8500B7E392 /* WPXMLRPCDecoder.m in Sources */,
C589571027500B9100B7E392 /* WPXMLRPCEncoder.m in Sources */,
C504653E274F77C70004B812 /* KeyboardLayoutGuide.swift in Sources */,
C5046549274F78460004B812 /* ItemNavigatorProtocol.swift in Sources */,
C5046536274F77C70004B812 /* Font+Settings.swift in Sources */,
C58956DF27500B3C00B7E392 /* ListViewModel.swift in Sources */,
Expand All @@ -1314,7 +1305,6 @@
C58956E527500B3C00B7E392 /* Item.swift in Sources */,
C58956D627500B3C00B7E392 /* ComposeViewModel.swift in Sources */,
C55BAF2A275D489D009E8A9C /* ComposeKeyboardInputView.swift in Sources */,
C5046538274F77C70004B812 /* FakeTableCellButton.swift in Sources */,
C58956D727500B3C00B7E392 /* Date+Ago.swift in Sources */,
C504653F274F77C70004B812 /* ItemTableViewCell.swift in Sources */,
C589570C27500B9100B7E392 /* WPXMLRPCDecoderDelegate.m in Sources */,
Expand Down Expand Up @@ -1360,7 +1350,6 @@
files = (
C58956F727500B3D00B7E392 /* Media.swift in Sources */,
5B583728212861770076121E /* SettingsNavigator.swift in Sources */,
C504652D274F77C60004B812 /* KeyboardLayoutGuide.swift in Sources */,
C55BAF29275D489D009E8A9C /* ComposeKeyboardInputView.swift in Sources */,
C5DEA4E1275B49C300530E96 /* HostingCell.swift in Sources */,
C5DEA4E3275B4A0C00530E96 /* ProfileCellView.swift in Sources */,
Expand Down Expand Up @@ -1439,7 +1428,6 @@
C58956F527500B3D00B7E392 /* Author.swift in Sources */,
C5046523274F77C60004B812 /* VideoThumbnailImageProvider.swift in Sources */,
C58956EE27500B3D00B7E392 /* DiscoveryCategoryStore.swift in Sources */,
C5046527274F77C60004B812 /* FakeTableCellButton.swift in Sources */,
C58956E927500B3D00B7E392 /* MicropubEndpoint.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
39 changes: 0 additions & 39 deletions Icro/Configurator/ProfileViewConfigurator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ final class ProfileViewConfigurator: NSObject {
func configure(_ view: HostingCell<ProfileCellView>, using author: Author, parentViewController: UIViewController) {
guard let username = author.username,
let followingCount = author.followingCount else {
emptyConfig(for: view)
return
}

Expand Down Expand Up @@ -57,42 +56,4 @@ final class ProfileViewConfigurator: NSObject {

view.set(rootView: profileCellView, parentController: parentViewController)
}

private func emptyConfig(for cell: HostingCell<ProfileCellView>) {
// cell.avatarImageView.image = nil
// cell.usernameLabel.text = ""
// cell.nameLabel.text = ""
// cell.followButton.setTitle("", for: .normal)
// cell.followingButton.setTitle("", for: .normal)
// cell.profileButton.setTitle("", for: .normal)
// cell.bioLabel.text = ""

}
}

private class AuthorImageGalleryDataSource: GalleryItemsDataSource {
let author: Author

init(author: Author) {
self.author = author
}

func itemCount() -> Int {
return 1
}

func provideGalleryItem(_ index: Int) -> GalleryItem {
return GalleryItem.image { completion in
// KingfisherManager.shared.downloader.downloadImage(with: self.author.avatar, completionHandler: { result in
// switch result {
// case .success(let imageLoadingResult):
// DispatchQueue.main.async {
// completion(imageLoadingResult.image)
// }
// default:
// return
// }
// })
}
}
}
1 change: 1 addition & 0 deletions IcroKit/ViewModel/ListViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ public class ListViewModel: NSObject {
let value = try await client.load(resource: type.resource)
self.isLoading = false

// TODO: Use mainActor here
DispatchQueue.main.async {
self.updateShowLoadMoreInBetweenAfterLoadMore(loadedNewItems: value.items)
self.loadedAuthor = value.author ?? self.loadedAuthor
Expand Down
1 change: 0 additions & 1 deletion IcroTests/UserListViewModelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import XCTest
import Client
@testable import Icro


class UserListViewModelTests: XCTestCase {
func test_numberOfUsers() {
let client = MockClient<[Author]>(returnedData: nil,
Expand Down
102 changes: 0 additions & 102 deletions IcroUIKit/Helper/KeyboardLayoutGuide.swift

This file was deleted.

2 changes: 1 addition & 1 deletion IcroUIKit/Helper/LocalizedString.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
import Foundation

public func localizedString(key: String) -> String {
let bundle = Bundle(for: KeyboardLayoutGuide.self)
let bundle = Bundle(for: ItemCellConfigurator.self)
return NSLocalizedString(key, tableName: nil, bundle: bundle, value: "", comment: "")
}
34 changes: 0 additions & 34 deletions IcroUIKit/View/FakeTableCellButton.swift

This file was deleted.

1 change: 1 addition & 0 deletions IcroUIKit/ViewController/ComposeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ struct ComposeView_Previews: PreviewProvider {
title: "Google"))

Group {
ComposeView(viewModel: viewModel)
ComposeView(viewModel: shareURLViewModel)
ComposeView(viewModel: replyViewModel)
ComposeView(viewModel: imageViewModel)
Expand Down

0 comments on commit 8dd078a

Please sign in to comment.