mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-27 18:41:01 +00:00
Sort imports
This commit is contained in:
parent
51e6a41bd3
commit
70720b3c26
45 changed files with 50 additions and 48 deletions
|
@ -3,3 +3,5 @@ disabled_rules:
|
||||||
# Swift 5.3
|
# Swift 5.3
|
||||||
- multiple_closures_with_trailing_closure
|
- multiple_closures_with_trailing_closure
|
||||||
- no_space_in_method_call
|
- no_space_in_method_call
|
||||||
|
opt_in_rules:
|
||||||
|
- sorted_imports
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import GRDB
|
import GRDB
|
||||||
import Mastodon
|
|
||||||
|
|
||||||
struct AccountResult: Codable, Hashable, FetchableRecord {
|
struct AccountResult: Codable, Hashable, FetchableRecord {
|
||||||
let account: AccountRecord
|
let account: AccountRecord
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import GRDB
|
import GRDB
|
||||||
import Keychain
|
import Keychain
|
||||||
import Mastodon
|
import Mastodon
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import GRDB
|
import GRDB
|
||||||
import Mastodon
|
|
||||||
|
|
||||||
struct StatusResult: Codable, Hashable, FetchableRecord {
|
struct StatusResult: Codable, Hashable, FetchableRecord {
|
||||||
let account: AccountRecord
|
let account: AccountRecord
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import GRDB
|
import GRDB
|
||||||
import Keychain
|
import Keychain
|
||||||
import Mastodon
|
import Mastodon
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import XCTest
|
|
||||||
@testable import DB
|
@testable import DB
|
||||||
|
import XCTest
|
||||||
|
|
||||||
final class DBTests: XCTestCase {
|
final class DBTests: XCTestCase {
|
||||||
func testExample() {
|
func testExample() {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import KingfisherSwiftUI
|
|
||||||
import struct Kingfisher.KingfisherOptionsInfo
|
|
||||||
import protocol Kingfisher.ImageProcessor
|
|
||||||
import struct Kingfisher.DownsamplingImageProcessor
|
import struct Kingfisher.DownsamplingImageProcessor
|
||||||
import struct Kingfisher.RoundCornerImageProcessor
|
|
||||||
import struct Kingfisher.FormatIndicatedCacheSerializer
|
import struct Kingfisher.FormatIndicatedCacheSerializer
|
||||||
|
import protocol Kingfisher.ImageProcessor
|
||||||
|
import struct Kingfisher.KingfisherOptionsInfo
|
||||||
|
import struct Kingfisher.RoundCornerImageProcessor
|
||||||
|
import KingfisherSwiftUI
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
extension KingfisherOptionsInfo {
|
extension KingfisherOptionsInfo {
|
||||||
static func downsampled(size: CGSize, scaleFactor: CGFloat, rounded: Bool = true) -> Self {
|
static func downsampled(size: CGSize, scaleFactor: CGFloat, rounded: Bool = true) -> Self {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import UIKit
|
|
||||||
import Kingfisher
|
import Kingfisher
|
||||||
import Mastodon
|
import Mastodon
|
||||||
|
import UIKit
|
||||||
|
|
||||||
extension NSMutableAttributedString {
|
extension NSMutableAttributedString {
|
||||||
func insert(emoji: [Emoji], view: UIView) {
|
func insert(emoji: [Emoji], view: UIView) {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
|
||||||
import Alamofire
|
import Alamofire
|
||||||
|
import Combine
|
||||||
|
import Foundation
|
||||||
|
|
||||||
public typealias Session = Alamofire.Session
|
public typealias Session = Alamofire.Session
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Alamofire
|
import Alamofire
|
||||||
|
import Foundation
|
||||||
|
|
||||||
public typealias HTTPMethod = Alamofire.HTTPMethod
|
public typealias HTTPMethod = Alamofire.HTTPMethod
|
||||||
public typealias HTTPHeaders = Alamofire.HTTPHeaders
|
public typealias HTTPHeaders = Alamofire.HTTPHeaders
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import XCTest
|
|
||||||
@testable import HTTP
|
@testable import HTTP
|
||||||
|
import XCTest
|
||||||
|
|
||||||
final class HTTPTests: XCTestCase {
|
final class HTTPTests: XCTestCase {
|
||||||
func testExample() {
|
func testExample() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import XCTest
|
|
||||||
@testable import Keychain
|
@testable import Keychain
|
||||||
|
import XCTest
|
||||||
|
|
||||||
final class KeychainTests: XCTestCase {
|
final class KeychainTests: XCTestCase {
|
||||||
func testExample() {
|
func testExample() {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public enum Constants {
|
public enum Constants {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import XCTest
|
|
||||||
@testable import Mastodon
|
@testable import Mastodon
|
||||||
|
import XCTest
|
||||||
|
|
||||||
final class MastodonTests: XCTestCase {
|
final class MastodonTests: XCTestCase {
|
||||||
func testExample() {
|
func testExample() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import HTTP
|
import HTTP
|
||||||
import Mastodon
|
import Mastodon
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import XCTest
|
|
||||||
@testable import MastodonAPI
|
@testable import MastodonAPI
|
||||||
|
import XCTest
|
||||||
|
|
||||||
final class MastodonAPITests: XCTestCase {
|
final class MastodonAPITests: XCTestCase {
|
||||||
func testExample() {
|
func testExample() {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import UserNotifications
|
|
||||||
import CryptoKit
|
import CryptoKit
|
||||||
import Keychain
|
import Keychain
|
||||||
import Mastodon
|
import Mastodon
|
||||||
import Secrets
|
import Secrets
|
||||||
|
import UserNotifications
|
||||||
|
|
||||||
class NotificationService: UNNotificationServiceExtension {
|
class NotificationService: UNNotificationServiceExtension {
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import XCTest
|
|
||||||
@testable import Secrets
|
@testable import Secrets
|
||||||
|
import XCTest
|
||||||
|
|
||||||
final class SecretsTests: XCTestCase {
|
final class SecretsTests: XCTestCase {
|
||||||
func testExample() {
|
func testExample() {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
|
import Combine
|
||||||
import DB
|
import DB
|
||||||
import Foundation
|
import Foundation
|
||||||
import Combine
|
|
||||||
import Mastodon
|
import Mastodon
|
||||||
import MastodonAPI
|
import MastodonAPI
|
||||||
import Secrets
|
import Secrets
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import Mastodon
|
import Mastodon
|
||||||
import MastodonAPI
|
import MastodonAPI
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
|
import Combine
|
||||||
import DB
|
import DB
|
||||||
import Foundation
|
import Foundation
|
||||||
import Combine
|
|
||||||
import Mastodon
|
import Mastodon
|
||||||
import MastodonAPI
|
import MastodonAPI
|
||||||
import Secrets
|
import Secrets
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
import DB
|
import DB
|
||||||
|
import Foundation
|
||||||
import Mastodon
|
import Mastodon
|
||||||
import MastodonAPI
|
import MastodonAPI
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import UserNotifications
|
import UserNotifications
|
||||||
|
|
||||||
public struct UserNotificationService {
|
public struct UserNotificationService {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import AuthenticationServices
|
import AuthenticationServices
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
|
|
||||||
public protocol WebAuthSession: AnyObject {
|
public protocol WebAuthSession: AnyObject {
|
||||||
init(url URL: URL,
|
init(url URL: URL,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import XCTest
|
|
||||||
import Combine
|
import Combine
|
||||||
import CombineExpectations
|
import CombineExpectations
|
||||||
@testable import ServiceLayer
|
@testable import ServiceLayer
|
||||||
@testable import ServiceLayerMocks
|
@testable import ServiceLayerMocks
|
||||||
|
import XCTest
|
||||||
|
|
||||||
class AuthenticationServiceTests: XCTestCase {
|
class AuthenticationServiceTests: XCTestCase {
|
||||||
func testAuthentication() throws {
|
func testAuthentication() throws {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import UIKit
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import UIKit
|
||||||
|
|
||||||
class AppDelegate: NSObject {
|
class AppDelegate: NSObject {
|
||||||
@Published private var application: UIApplication?
|
@Published private var application: UIApplication?
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import SwiftUI
|
||||||
import ViewModels
|
import ViewModels
|
||||||
|
|
||||||
class StatusListViewController: UITableViewController {
|
class StatusListViewController: UITableViewController {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import HTTP
|
import HTTP
|
||||||
import Mastodon
|
import Mastodon
|
||||||
import MastodonAPI
|
import MastodonAPI
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
public class AddIdentityViewModel: ObservableObject {
|
public class AddIdentityViewModel: ObservableObject {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import Mastodon
|
import Mastodon
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
|
|
||||||
extension Publisher {
|
extension Publisher {
|
||||||
func assignErrorsToAlertItem<Root: AnyObject>(
|
func assignErrorsToAlertItem<Root: AnyObject>(
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import Mastodon
|
import Mastodon
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import Mastodon
|
import Mastodon
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import Mastodon
|
import Mastodon
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
public class PostingReadingPreferencesViewModel: ObservableObject {
|
public class PostingReadingPreferencesViewModel: ObservableObject {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
public final class RootViewModel: ObservableObject {
|
public final class RootViewModel: ObservableObject {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import Mastodon
|
import Mastodon
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import Mastodon
|
import Mastodon
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
import Mastodon
|
import Mastodon
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import XCTest
|
|
||||||
import Combine
|
import Combine
|
||||||
import CombineExpectations
|
import CombineExpectations
|
||||||
import HTTP
|
import HTTP
|
||||||
|
@ -9,6 +8,7 @@ import MockKeychain
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
import ServiceLayerMocks
|
import ServiceLayerMocks
|
||||||
@testable import ViewModels
|
@testable import ViewModels
|
||||||
|
import XCTest
|
||||||
|
|
||||||
class AddIdentityViewModelTests: XCTestCase {
|
class AddIdentityViewModelTests: XCTestCase {
|
||||||
func testAddIdentity() throws {
|
func testAddIdentity() throws {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import XCTest
|
|
||||||
import Combine
|
import Combine
|
||||||
import CombineExpectations
|
import CombineExpectations
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
import ServiceLayerMocks
|
import ServiceLayerMocks
|
||||||
@testable import ViewModels
|
@testable import ViewModels
|
||||||
|
import XCTest
|
||||||
|
|
||||||
class RootViewModelTests: XCTestCase {
|
class RootViewModelTests: XCTestCase {
|
||||||
var cancellables = Set<AnyCancellable>()
|
var cancellables = Set<AnyCancellable>()
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import UIKit
|
|
||||||
import Kingfisher
|
import Kingfisher
|
||||||
|
import UIKit
|
||||||
import ViewModels
|
import ViewModels
|
||||||
|
|
||||||
class AttachmentView: UIView {
|
class AttachmentView: UIView {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import KingfisherSwiftUI
|
import KingfisherSwiftUI
|
||||||
|
import SwiftUI
|
||||||
import ViewModels
|
import ViewModels
|
||||||
|
|
||||||
struct IdentitiesView: View {
|
struct IdentitiesView: View {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import KingfisherSwiftUI
|
import KingfisherSwiftUI
|
||||||
|
import SwiftUI
|
||||||
import ViewModels
|
import ViewModels
|
||||||
|
|
||||||
struct SecondaryNavigationView: View {
|
struct SecondaryNavigationView: View {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright © 2020 Metabolist. All rights reserved.
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import KingfisherSwiftUI
|
import KingfisherSwiftUI
|
||||||
import enum Mastodon.Timeline
|
import enum Mastodon.Timeline
|
||||||
|
import SwiftUI
|
||||||
import ViewModels
|
import ViewModels
|
||||||
|
|
||||||
struct TabNavigationView: View {
|
struct TabNavigationView: View {
|
||||||
|
|
Loading…
Reference in a new issue