Skip to content

Commit

Permalink
1.9.5!!
Browse files Browse the repository at this point in the history
  • Loading branch information
cranci1 committed Jun 1, 2024
1 parent caecfcf commit 68a9578
Show file tree
Hide file tree
Showing 24 changed files with 184 additions and 128 deletions.
24 changes: 16 additions & 8 deletions AnimeGen.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
136BD7E82BE7E24100ED23AE /* Developer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 136BD7E72BE7E24100ED23AE /* Developer.swift */; };
1393C3A92BEBC94300704137 /* AppPreff.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1393C3A62BEBC94300704137 /* AppPreff.swift */; };
1393C3AA2BEBC94300704137 /* Dev-History.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1393C3A72BEBC94300704137 /* Dev-History.swift */; };
1393C3AB2BEBC94300704137 /* moe-content.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1393C3A82BEBC94300704137 /* moe-content.swift */; };
1393C3AB2BEBC94300704137 /* content-tags.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1393C3A82BEBC94300704137 /* content-tags.swift */; };
13A8496B2BF479DA009A9442 /* n-sfw.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13A8496A2BF479DA009A9442 /* n-sfw.swift */; };
13A8496E2BF4F0E7009A9442 /* FrameWorksCredits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13A8496D2BF4F0E7009A9442 /* FrameWorksCredits.swift */; };
13A849702BF4F118009A9442 /* Contributor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13A8496F2BF4F118009A9442 /* Contributor.swift */; };
Expand Down Expand Up @@ -78,7 +78,7 @@
136BD7E72BE7E24100ED23AE /* Developer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Developer.swift; sourceTree = "<group>"; };
1393C3A62BEBC94300704137 /* AppPreff.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppPreff.swift; sourceTree = "<group>"; };
1393C3A72BEBC94300704137 /* Dev-History.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Dev-History.swift"; sourceTree = "<group>"; };
1393C3A82BEBC94300704137 /* moe-content.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "moe-content.swift"; sourceTree = "<group>"; };
1393C3A82BEBC94300704137 /* content-tags.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "content-tags.swift"; sourceTree = "<group>"; };
13A8496A2BF479DA009A9442 /* n-sfw.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "n-sfw.swift"; sourceTree = "<group>"; };
13A8496D2BF4F0E7009A9442 /* FrameWorksCredits.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrameWorksCredits.swift; sourceTree = "<group>"; };
13A8496F2BF4F118009A9442 /* Contributor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Contributor.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -148,6 +148,7 @@
133C4C852BE67CAB00258EDD /* AnimeGen */ = {
isa = PBXGroup;
children = (
13C4BC492C0B772500B6DB43 /* Secrets-Settings */,
13EC98F12BEBC11500759605 /* NotificationCenter */,
136BD7D82BE7CA6300ED23AE /* History */,
13D4FBE72BE768B400BC3D1C /* Buttons func */,
Expand All @@ -157,8 +158,6 @@
133C4C882BE67CAB00258EDD /* SceneDelegate.swift */,
133C4C862BE67CAB00258EDD /* AppDelegate.swift */,
133C4C8A2BE67CAB00258EDD /* ViewController.swift */,
13D4FC2C2BE7719700BC3D1C /* Secrets.swift */,
1366F0A62C00EB7B00862707 /* ImageSettings.swift */,
133C4C8F2BE67CAD00258EDD /* Assets.xcassets */,
13D4FBDF2BE7661A00BC3D1C /* Main.storyboard */,
13D4FC2E2BE779A200BC3D1C /* LaunchScreen.storyboard */,
Expand Down Expand Up @@ -195,6 +194,15 @@
path = About;
sourceTree = "<group>";
};
13C4BC492C0B772500B6DB43 /* Secrets-Settings */ = {
isa = PBXGroup;
children = (
13D4FC2C2BE7719700BC3D1C /* Secrets.swift */,
1366F0A62C00EB7B00862707 /* ImageSettings.swift */,
);
path = "Secrets-Settings";
sourceTree = "<group>";
};
13D4FBE12BE7683D00BC3D1C /* APIs Requests */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -279,7 +287,7 @@
children = (
1393C3A62BEBC94300704137 /* AppPreff.swift */,
1393C3A72BEBC94300704137 /* Dev-History.swift */,
1393C3A82BEBC94300704137 /* moe-content.swift */,
1393C3A82BEBC94300704137 /* content-tags.swift */,
);
path = NotificationCenter;
sourceTree = "<group>";
Expand Down Expand Up @@ -367,7 +375,7 @@
13A849702BF4F118009A9442 /* Contributor.swift in Sources */,
13D4FBF42BE76FC000BC3D1C /* Activity.swift in Sources */,
13D4FC2D2BE7719700BC3D1C /* Secrets.swift in Sources */,
1393C3AB2BEBC94300704137 /* moe-content.swift in Sources */,
1393C3AB2BEBC94300704137 /* content-tags.swift in Sources */,
136BD7E42BE7DFEE00ED23AE /* AppPref.swift in Sources */,
13D4FBEB2BE76D0600BC3D1C /* ImageExtensions.swift in Sources */,
13D4FBE92BE768C100BC3D1C /* HeartButton.swift in Sources */,
Expand Down Expand Up @@ -553,7 +561,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.9;
MARKETING_VERSION = 1.9.5;
PRODUCT_BUNDLE_IDENTIFIER = me.cranci.AnimeGen;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down Expand Up @@ -584,7 +592,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.9;
MARKETING_VERSION = 1.9.5;
PRODUCT_BUNDLE_IDENTIFIER = me.cranci.AnimeGen;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down
Binary file not shown.
1 change: 1 addition & 0 deletions AnimeGen/APIs Requests/kyoko.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,6 @@ extension ViewController {
animateImageChange(with: newImage)
stopLoadingIndicator()
incrementCounter()
setTagsLines0()
}
}
1 change: 1 addition & 0 deletions AnimeGen/APIs Requests/n-sfw.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,6 @@ extension ViewController {
animateImageChange(with: newImage)
stopLoadingIndicator()
incrementCounter()
setTagsLines0()
}
}
1 change: 1 addition & 0 deletions AnimeGen/APIs Requests/nekos-best.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,6 @@ extension ViewController {
animateImageChange(with: image)
stopLoadingIndicator()
incrementCounter()
setTagsLines0()
}
}
1 change: 1 addition & 0 deletions AnimeGen/APIs Requests/nekos-life.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ extension ViewController {
animateImageChange(with: newImage)
stopLoadingIndicator()
incrementCounter()
setTagsLines0()
}
}

1 change: 1 addition & 0 deletions AnimeGen/APIs Requests/nekosapi.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,6 @@ extension ViewController {
animateImageChange(with: image)
stopLoadingIndicator()
incrementCounter()
setTagsLines0()
}
}
1 change: 1 addition & 0 deletions AnimeGen/APIs Requests/nekosbot.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,6 @@ extension ViewController {
animateImageChange(with: newImage)
stopLoadingIndicator()
incrementCounter()
setTagsLines0()
}
}
8 changes: 2 additions & 6 deletions AnimeGen/APIs Requests/nekosmoe.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,8 @@ extension ViewController {
self.addImageToHistory(image: newImage, tags: tags)
}
self.incrementCounter()

if self.moetags {
self.tagsLabel.isHidden = false
} else {
self.tagsLabel.isHidden = true
}
self.tagsLabel.isHidden = false
self.setTagsLines0()
} else {
print("Failed to load image data.")
}
Expand Down
1 change: 1 addition & 0 deletions AnimeGen/APIs Requests/pic-re.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,6 @@ extension ViewController {
animateImageChange(with: newImage)
stopLoadingIndicator()
incrementCounter()
setTagsLines0()
}
}
1 change: 1 addition & 0 deletions AnimeGen/APIs Requests/purr.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,6 @@ extension ViewController {
animateImageChange(with: newImage)
stopLoadingIndicator()
incrementCounter()
setTagsLines0()
}
}
1 change: 1 addition & 0 deletions AnimeGen/APIs Requests/waifu-im.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,6 @@ extension ViewController {
animateImageChange(with: image)
stopLoadingIndicator()
incrementCounter()
setTagsLines0()
}
}
1 change: 1 addition & 0 deletions AnimeGen/APIs Requests/waifu-it.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,6 @@ extension ViewController {
animateImageChange(with: newImage)
stopLoadingIndicator()
incrementCounter()
setTagsLines0()
}
}
1 change: 1 addition & 0 deletions AnimeGen/APIs Requests/waifu-pics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,6 @@ extension ViewController {
animateImageChange(with: newImage)
stopLoadingIndicator()
incrementCounter()
setTagsLines0()
}
}
2 changes: 1 addition & 1 deletion AnimeGen/Buttons func/Refresh-API-Button.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ extension ViewController {
}
}

@objc func apiButtonTapped() {
@IBAction func apiButtonTapped() {
let alertController = UIAlertController(title: "Select API", message: nil, preferredStyle: .actionSheet)

let apiOptions: [String]
Expand Down
2 changes: 1 addition & 1 deletion AnimeGen/Buttons func/RewindButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extension ViewController {
imageHistory.append((image, tags))
}

@objc func rewindButtonTapped() {
@IBAction func rewindButtonTapped() {
guard currentPosition > 0 else {
print("No previous images to rewind to.")
return
Expand Down
25 changes: 15 additions & 10 deletions AnimeGen/Extension/Tags.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,26 @@ extension ViewController {
}

tagsLabel.attributedText = attributedString

tagsLabel.numberOfLines = tagsExpanded ? 0 : 1
tagsLabel.numberOfLines = 1
tagsLabel.lineBreakMode = .byTruncatingTail
}

func setupTagLabelTapGesture() {
let tapGesture = UITapGestureRecognizer(target: self, action: #selector(toggleTagsExpansion))
tagsLabel.isUserInteractionEnabled = true

let tapGesture = UITapGestureRecognizer(target: self, action: #selector(handleLabelTap))
tagsLabel.addGestureRecognizer(tapGesture)
}

@objc func toggleTagsExpansion() {
tagsExpanded.toggle()
tagsLabel.numberOfLines = tagsExpanded ? 0 : 1
tagsLabel.lineBreakMode = tagsExpanded ? .byWordWrapping : .byTruncatingTail
@IBAction func handleLabelTap() {
if tagsLabel.numberOfLines == 1 {
tagsLabel.numberOfLines = 0
} else {
tagsLabel.numberOfLines = 1
}
}

func setTagsLines0() {
if !TagsHide{
tagsLabel.numberOfLines = 0
}
}

func startLoadingIndicator() {
Expand Down
2 changes: 0 additions & 2 deletions AnimeGen/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>The photo Library Addition is required to save images.</string>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
Expand Down
Loading

0 comments on commit 68a9578

Please sign in to comment.