Skip to content

Commit

Permalink
refactored all names
Browse files Browse the repository at this point in the history
  • Loading branch information
EricBAndrews committed Sep 21, 2023
1 parent 3516c5c commit 21de663
Show file tree
Hide file tree
Showing 43 changed files with 328 additions and 273 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"pins" : [
{
"identity" : "combine-schedulers",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/combine-schedulers",
"state" : {
"revision" : "ec62f32d21584214a4b27c8cee2b2ad70ab2c38a",
"version" : "0.11.0"
}
},
{
"identity" : "keychainaccess",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kishikawakatsumi/KeychainAccess.git",
"state" : {
"branch" : "master",
"revision" : "ecb18d8ce4d88277cc4fb103973352d91e18c535"
}
},
{
"identity" : "nuke",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kean/Nuke",
"state" : {
"revision" : "989586f86b683680f7bd5765d6a5683edbea0c1b",
"version" : "12.1.4"
}
},
{
"identity" : "swift-clocks",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-clocks",
"state" : {
"revision" : "0fbaebfc013715dab44d715a4d350ba37f297e4d",
"version" : "0.4.0"
}
},
{
"identity" : "swift-concurrency-extras",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-concurrency-extras",
"state" : {
"revision" : "479750bd98fac2e813fffcf2af0728b5b0085795",
"version" : "0.1.1"
}
},
{
"identity" : "swift-dependencies",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-dependencies",
"state" : {
"revision" : "16fd42ae04c6e7f74a6a86395d04722c641cccee",
"version" : "0.6.0"
}
},
{
"identity" : "swift-markdown-ui",
"kind" : "remoteSourceControl",
"location" : "https://github.com/gonzalezreal/swift-markdown-ui.git",
"state" : {
"revision" : "12b351a75201a8124c2f2e1f9fc6ef5cd812c0b9",
"version" : "2.1.0"
}
},
{
"identity" : "xctest-dynamic-overlay",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state" : {
"revision" : "50843cbb8551db836adec2290bb4bc6bac5c1865",
"version" : "0.9.0"
}
}
],
"version" : 2
}
18 changes: 18 additions & 0 deletions Mlem/API/Models/ScoringOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,21 @@ enum ScoringOperation: Int, Decodable {
case downvote = -1
case resetVote = 0
}

extension ScoringOperation: AssociatedIcon {
var iconName: String {
switch self {
case .upvote: return Icons.upvoteSquare
case .downvote: return Icons.downvoteSquare
case .resetVote: return Icons.resetVoteSquare
}
}

var iconNameFill: String {
switch self {
case .upvote: return Icons.upvoteSquareFill
case .downvote: return Icons.downvoteSquareFill
case .resetVote: return Icons.resetVoteSquareFill
}
}
}
12 changes: 6 additions & 6 deletions Mlem/Enums/FeedType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ enum FeedType: String, Encodable, SettingsOptions {
extension FeedType: AssociatedIcon {
var iconName: String {
switch self {
case .all: return Icons.federatedFeedSymbolName
case .local: return Icons.localFeedSymbolName
case .subscribed: return Icons.subscribedFeedSymbolName
case .all: return Icons.federatedFeed
case .local: return Icons.localFeed
case .subscribed: return Icons.subscribedFeed
}
}

var iconNameFill: String {
switch self {
case .all: return Icons.federatedFeedSymbolName
case .local: return Icons.localFeedSymbolNameFill
case .subscribed: return Icons.subscribedFeedSymbolNameFill
case .all: return Icons.federatedFeed
case .local: return Icons.localFeedFill
case .subscribed: return Icons.subscribedFeedFill
}
}

Expand Down
12 changes: 6 additions & 6 deletions Mlem/Enums/Settings/PostSize.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ extension PostSize: SettingsOptions {
extension PostSize: AssociatedIcon {
var iconName: String {
switch self {
case .compact: return Icons.compactSymbolName
case .headline: return Icons.headlineSymbolName
case .large: return Icons.largeSymbolName
case .compact: return Icons.compactPost
case .headline: return Icons.headlinePost
case .large: return Icons.largePost
}
}

var iconNameFill: String {
switch self {
case .compact: return Icons.compactSymbolNameFill
case .headline: return Icons.headlineSymbolNameFill
case .large: return Icons.largeSymbolNameFill
case .compact: return Icons.compactPostFill
case .headline: return Icons.headlinePostFill
case .large: return Icons.largePostFill
}
}
}
28 changes: 14 additions & 14 deletions Mlem/Enums/Settings/PostSortType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,25 +84,25 @@ extension PostSortType: SettingsOptions {
extension PostSortType: AssociatedIcon {
var iconName: String {
switch self {
case .active: return Icons.activeSortSymbolName
case .hot: return Icons.hotSortSymbolName
case .new: return Icons.newSortSymbolName
case .old: return Icons.oldSortSymbolName
case .newComments: return Icons.newCommentsSymbolName
case .mostComments: return Icons.mostCommentsSymbolName
default: return Icons.timeSymbolName
case .active: return Icons.activeSort
case .hot: return Icons.hotSort
case .new: return Icons.newSort
case .old: return Icons.oldSort
case .newComments: return Icons.newCommentsSort
case .mostComments: return Icons.mostCommentsSort
default: return Icons.timeSort
}
}

var iconNameFill: String {
switch self {
case .active: return Icons.activeSortSymbolNameFill
case .hot: return Icons.hotSortSymbolNameFill
case .new: return Icons.newSortSymbolNameFill
case .old: return Icons.oldSortSymbolNameFill
case .newComments: return Icons.newCommentsSymbolNameFill
case .mostComments: return Icons.mostCommentsSymbolNameFill
default: return Icons.timeSymbolNameFill
case .active: return Icons.activeSortFill
case .hot: return Icons.hotSortFill
case .new: return Icons.newSortFill
case .old: return Icons.oldSortFill
case .newComments: return Icons.newCommentsSortFill
case .mostComments: return Icons.mostCommentsSortFill
default: return Icons.timeSortFill
}
}
}
2 changes: 1 addition & 1 deletion Mlem/Extensions/NSFW Overlay.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct NSFWOverlay: ViewModifier {
.background(.thinMaterial)
.cornerRadius(AppConstants.largeItemCornerRadius)
} else if isNsfw, shouldBlurNsfw {
Image(systemName: Icons.nsfw)
Image(systemName: Icons.hide)
.foregroundColor(.white)
.padding(4)
.background(.thinMaterial)
Expand Down
Loading

0 comments on commit 21de663

Please sign in to comment.