Skip to content

Commit

Permalink
Add Knux icon
Browse files Browse the repository at this point in the history
  • Loading branch information
twodayslate committed Dec 9, 2022
1 parent 3b25c87 commit 7d1c3a3
Show file tree
Hide file tree
Showing 8 changed files with 2,372 additions and 5 deletions.
4 changes: 2 additions & 2 deletions claw.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES = "Akhmad437LobsterLightIcon Akhmad437LobsterDarkIcon";
ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES = "Akhmad437LobsterLightIcon Akhmad437LobsterDarkIcon KnuxIcon";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
Expand Down Expand Up @@ -983,7 +983,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES = "Akhmad437LobsterLightIcon Akhmad437LobsterDarkIcon";
ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES = "Akhmad437LobsterLightIcon Akhmad437LobsterDarkIcon KnuxIcon";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
Expand Down
12 changes: 12 additions & 0 deletions claw/Assets.xcassets/KnuxIcon-thumb.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "LobsterIcon_ZacGorak.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
2,326 changes: 2,326 additions & 0 deletions claw/Assets.xcassets/KnuxIcon-thumb.imageset/LobsterIcon_ZacGorak.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions claw/Assets.xcassets/KnuxIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"images" : [
{
"filename" : "LobsterIcon_ZacGorak.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion claw/CommentHierarchy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ struct HierarchyCommentView<RowContent, HeaderContent>: View where RowContent: V
withAnimation(.easeIn) {
isExpanded.toggle()
}
}, label: {Label(isExpanded ? "Collapse" : "Expand", systemImage: "rectangle.expand.vertical")})
}, label: {Label(isExpanded ? "Collapse" : "Expand", systemImage: isExpanded ? "rectangle.compress.vertical" : "rectangle.expand.vertical")})
}).onTapGesture(count: /*@START_MENU_TOKEN@*/1/*@END_MENU_TOKEN@*/, perform: {
withAnimation(.easeIn) {
backgroundColorState = Color(UIColor.systemGray4)
Expand Down
2 changes: 0 additions & 2 deletions claw/GenericArrayFetcher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@ class GenericArrayFetcher<T: Hashable & Codable>: ObservableObject {
}
}


func reload() {
self.session?.cancel()
self.moreSession?.cancel()
self.isReloading = true
self.load()
}


func load() {
self.page = 1
Expand Down
17 changes: 17 additions & 0 deletions claw/Settings/AppIconChooserView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,23 @@ struct AppIconChooserView: View {
.environmentObject(settings)
})
}
Section {
Button(action: {
UIApplication.shared.setAlternateIconName("KnuxIcon", completionHandler: {error in
guard error == nil else {
// show error
return
}
settings.alternateIconName = "KnuxIcon"
try? settings.managedObjectContext?.save()
self.presentationMode.wrappedValue.dismiss()
})
}, label: {
AppIconView(icon: AppIcon(alternateIconName: "KnuxIcon", name: "Pixel Lobster", assetName: "KnuxIcon-thumb", subtitle: "Knux 400"))
.environmentObject(settings)
})
}

VStack(alignment: .leading) {
HStack(alignment: .bottom) {
Spacer()
Expand Down

0 comments on commit 7d1c3a3

Please sign in to comment.