Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectricS01 committed Oct 17, 2024
1 parent ef22762 commit faa7ba0
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 39 deletions.
4 changes: 2 additions & 2 deletions TPU_Mac.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@
CODE_SIGN_ENTITLEMENTS = TPU_Mac/TPU_Mac.entitlements;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"TPU_Mac/Preview Content\"";
DEVELOPMENT_TEAM = PK36GR28A7;
Expand Down Expand Up @@ -540,7 +540,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = TPU_Mac/TPU_Mac.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"TPU_Mac/Preview Content\"";
DEVELOPMENT_TEAM = PK36GR28A7;
Expand Down
71 changes: 36 additions & 35 deletions TPU_Mac/CommsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -359,46 +359,47 @@ struct CommsView: View {
}
ForEach(message.embeds, id: \.self) { embed in
VStack {
if let text = embed.text, embed.text != [] {
ForEach(Array(text.enumerated()), id: \.element) { index, line in
if index == 0 {
Text(line.text ?? "").font( .title2).lineLimit(1 : nil)
} else {
Text(line.text ?? "")
VStack {
if let text = embed.text, embed.text != [] {
ForEach(Array(text.enumerated()), id: \.element) { index, line in
if index == 0 {
Text(line.text ?? "").font(.title2).lineLimit(1)
} else {
Text(line.text ?? "")
}
}
}
}
if let media = embed.media, embed.media != [] {
ForEach(media, id: \.self) { img in
if img.mimeType != "image/gif" {
LazyImage(url: URL(string: img.attachment == nil ? ("https://i.electrics01.com" + (img.proxyUrl ?? "")) : ("https://i.electrics01.com/i/" + (img.attachment ?? "")))) { state in
if let image = state.image {
image.resizable().aspectRatio(contentMode: .fit)
// .onAppear {
//// if chatMessages.count != 0 {
//// proxy.scrollTo(0, anchor: .bottom)
//// }
// }
} else if state.error != nil {
Color.red
} else {
ProgressView()
if let media = embed.media, embed.media != [] {
ForEach(media, id: \.self) { img in
if img.mimeType != "image/gif" {
LazyImage(url: URL(string: img.attachment == nil ? ("https://i.electrics01.com" + (img.proxyUrl ?? "")) : ("https://i.electrics01.com/i/" + (img.attachment ?? "")))) { state in
if let image = state.image {
image.resizable().aspectRatio(contentMode: .fit)
// .onAppear {
//// if chatMessages.count != 0 {
//// proxy.scrollTo(0, anchor: .bottom)
//// }
// }
} else if state.error != nil {
Color.red
} else {
ProgressView()
}
}
}
} else {
HStack {
WebImage(url: URL(string: img.attachment == nil ? ("https://i.electrics01.com" + (img.proxyUrl ?? "")) : ("https://i.electrics01.com/i/" + (img.attachment ?? "")))) { image in
image.resizable().aspectRatio(contentMode: .fit)
} placeholder: {
ProgressView()
} else {
HStack {
WebImage(url: URL(string: img.attachment == nil ? ("https://i.electrics01.com" + (img.proxyUrl ?? "")) : ("https://i.electrics01.com/i/" + (img.attachment ?? "")))) { image in
image.resizable().aspectRatio(contentMode: .fit)
} placeholder: {
ProgressView()
}
}
}
}
}.frame(minWidth: 0, maxWidth: 600, minHeight: 0, maxHeight: 400).clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous))
}
}.padding(8)
}.frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity, alignment: .topLeading).background()
.clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous))
}.frame(minWidth: 0, maxWidth: 600, minHeight: 0, maxHeight: 400).clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous))
}
}.padding(embed.text ?? [] != [] ? 8 : 0)
}.frame(minWidth: 0, maxWidth: 600).background().clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous))
}.frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity, alignment: .topLeading)
}
Button(action: {
if replyingId != message.id {
Expand Down
4 changes: 2 additions & 2 deletions TPU_Mac/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ struct SettingsView: View {
Text("Coming soon")
#else
Text("TPU iOS").font(.system(size: 32, weight: .semibold))
Text("Version " + (Bundle.main.infoDictionary?[kCFBundleVersionKey as String] as? String ?? "") + " (16/10/2024)")
Text("Version " + (Bundle.main.infoDictionary?[kCFBundleVersionKey as String] as? String ?? "") + " (17/10/2024)")
Text("Made by ElectricS01")
Text("[Give it a Star on GitHub](https://github.com/ElectricS01/TPU-Mac)")
#endif
Expand All @@ -272,7 +272,7 @@ struct AboutView: View {
Text("About")
.navigationTitle("About")
Text("TPU Mac").font(.system(size: 32, weight: .semibold))
Text("Version " + (Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "") + " (16/10/2024)")
Text("Version " + (Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "") + " (17/10/2024)")
Text("Made by ElectricS01")
Text("[Give it a Star on GitHub](https://github.com/ElectricS01/TPU-Mac)")
}
Expand Down

0 comments on commit faa7ba0

Please sign in to comment.