-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9fc505
commit e697b13
Showing
59 changed files
with
454 additions
and
393 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...nsions/Array - Move Elements Around.swift → ...Extensions/Array/Array+MoveElements.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Mlem/Extensions/Array - Prepend.swift → Mlem/Extensions/Array/Array+Prepend.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// | ||
// Array - Prepend.swift | ||
// Array+Prepend.swift | ||
// Mlem | ||
// | ||
// Created by David Bureš on 07.05.2023. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...xtensions/Bundle - Current App Icon.swift → ...tensions/Bundle/Bundle+IconFileName.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// | ||
// Bundle - Current App Icon.swift | ||
// Bundle+IconFileName.swift | ||
// Mlem | ||
// | ||
// Created by tht7 on 28/06/2023. | ||
|
2 changes: 1 addition & 1 deletion
2
Mlem/Extensions/Bundle.swift → ...nsions/Bundle/Bundle+VersionNumbers.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// | ||
// Bundle.swift | ||
// Bundle+VersionNumbers.swift | ||
// Mlem | ||
// | ||
// Created by Jake Shirley on 6/23/23. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Mlem/Extensions/Date.swift → Mlem/Extensions/Date/Date+RelativeTime.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// | ||
// Date.swift | ||
// Date+RelativeTime.swift | ||
// Mlem | ||
// | ||
// Created by Jake Shirley on 6/22/23. | ||
|
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
Mlem/Extensions/Double.swift → .../Extensions/Double/Double+MaxZIndex.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// | ||
// Double.swift | ||
// Double+MaxZIndex.swift | ||
// Mlem | ||
// | ||
// Created by Bosco Ho on 2023-08-07. | ||
|
2 changes: 1 addition & 1 deletion
2
Mlem/Extensions/Environment+AppFlow.swift → ...entValues/EnvironmentValues+AppFlow.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ions/Environment - EasterFlagSetter.swift → .../EnvironmentValues+EasterFlagSetter.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
Mlem/Extensions/EnvironmentValues/EnvironmentValues+NavigationPath.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// EnvironmentValues+NavigationPath.swift | ||
// Mlem | ||
// | ||
// Created by Eric Andrews on 2023-12-16. | ||
// | ||
|
||
import Foundation | ||
import SwiftUI | ||
|
||
private struct NavigationPathGetter: EnvironmentKey { | ||
static let defaultValue: Binding<NavigationPath> = .constant(NavigationPath()) | ||
} | ||
|
||
extension EnvironmentValues { | ||
var navigationPath: Binding<NavigationPath> { | ||
get { self[NavigationPathGetter.self] } | ||
set { self[NavigationPathGetter.self] = newValue } | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
Mlem/Extensions/EnvironmentValues/EnvironmentValues+NavigationPathWithRoutes.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// EnvironmentValues+NavigationPathWithRoutes.swift | ||
// Mlem | ||
// | ||
// Created by tht7 on 22/06/2023. | ||
// | ||
|
||
import Foundation | ||
import SwiftUI | ||
|
||
private struct NavigationPathWithRoutes: EnvironmentKey { | ||
static let defaultValue: Binding<[AppRoute]> = .constant([]) | ||
} | ||
|
||
extension EnvironmentValues { | ||
var navigationPathWithRoutes: Binding<[AppRoute]> { | ||
get { self[NavigationPathWithRoutes.self] } | ||
set { self[NavigationPathWithRoutes.self] = newValue } | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...s/Environment+ScrollViewReaderProxy.swift → ...ronmentValues+ScrollViewReaderProxy.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ancyTabBarReselectionEnvironmentKey.swift → ...nmentValues+TabReselectionHashValue.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../FancyTabBarSelectionEnvironmentKey.swift → ...ronmentValues+TabSelectionHashValue.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...tensions/OperationQueue - Easy init.swift → ...ueue/OperationQueue+ConvenienceInit.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// String+Alphabet.swift | ||
// Mlem | ||
// | ||
// Created by Eric Andrews on 2023-12-16. | ||
// | ||
|
||
import Foundation | ||
|
||
extension [String] { | ||
static var alphabet: Self { | ||
["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...ring - Contains Elements From Array.swift → Mlem/Extensions/String/String+Contains.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// String+IsNotEmpty.swift | ||
// Mlem | ||
// | ||
// Created by Eric Andrews on 2023-12-16. | ||
// | ||
|
||
import Foundation | ||
|
||
extension String { | ||
var isNotEmpty: Bool { | ||
!isEmpty | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// String+Trimmed.swift | ||
// Mlem | ||
// | ||
// Created by Eric Andrews on 2023-12-16. | ||
// | ||
|
||
import Foundation | ||
|
||
extension String { | ||
var trimmed: String { | ||
trimmingCharacters(in: .whitespacesAndNewlines) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// String+WithEscapedCharacters.swift | ||
// Mlem | ||
// | ||
// Created by Eric Andrews on 2023-12-16. | ||
// | ||
|
||
import Foundation | ||
|
||
extension String { | ||
func withEscapedCharacters() -> String? { | ||
do { | ||
let jsonRepresentation = try JSONEncoder().encode(self) | ||
return String(data: jsonRepresentation, encoding: .utf8) | ||
} catch { | ||
return nil | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
Mlem/Extensions/UIApplication/UIApplication+TopMostViewController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// UIApplication+TopMostViewController.swift | ||
// Mlem | ||
// | ||
// Created by Eric Andrews on 2023-12-16. | ||
// | ||
|
||
import Foundation | ||
import UIKit | ||
|
||
extension UIApplication { | ||
var topMostViewController: UIViewController? { | ||
UIApplication.shared.firstKeyWindow?.rootViewController?.topMostViewController() | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...ceStyle - SettingsOption conformant.swift → ...IUserInterfaceStyle+SettingsOptions.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.