Skip to content

Commit

Permalink
General: Release 1.5.1 (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
anian03 authored Dec 4, 2024
2 parents 47db139 + b782257 commit dcd8570
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"originHash" : "5cadd12433353b4144bcc99fd464b53c0aa36084b12784b90706859f84dad8c5",
"originHash" : "5c8626acffff005e2642c0e07e1f755598c39323b3bb020fb01711f64303781e",
"pins" : [
{
"identity" : "apollon-ios-module",
Expand All @@ -15,8 +15,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/ls1intum/artemis-ios-core-modules",
"state" : {
"revision" : "ffa278884a4c61262a0cdc227084e838a8649c89",
"version" : "15.1.0"
"revision" : "83a8eafae4d7b098e303aa0c06b392c505852b7f",
"version" : "15.1.2"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Artemis/Supporting/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.5.0</string>
<string>1.5.1</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>ITSAppUsesNonExemptEncryption</key>
Expand Down
2 changes: 1 addition & 1 deletion ArtemisKit/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let package = Package(
dependencies: [
.package(url: "https://github.com/Kelvas09/EmojiPicker.git", from: "1.0.0"),
.package(url: "https://github.com/ls1intum/apollon-ios-module", .upToNextMajor(from: "1.0.2")),
.package(url: "https://github.com/ls1intum/artemis-ios-core-modules", .upToNextMajor(from: "15.1.0")),
.package(url: "https://github.com/ls1intum/artemis-ios-core-modules", .upToNextMajor(from: "15.1.2")),
.package(url: "https://github.com/mac-cain13/R.swift.git", from: "7.7.0")
],
targets: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ extension SendMessageViewModel {
}

func performOnDisappear() {
keyboardVisible = false
do {
if let host = userSession.institution?.baseURL?.host() {
switch configuration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,6 @@ private struct UploadImageView: View {
.animation(.smooth(duration: 0.2), value: viewModel.uploadState)
}
.interactiveDismissDisabled()
.onChange(of: viewModel.uploadState) {
if viewModel.uploadState == .done {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
dismiss()
}
}
if viewModel.error != nil {
DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
dismiss()
}
}
}
}

@ViewBuilder var statusIcon: some View {
Expand All @@ -89,10 +77,20 @@ private struct UploadImageView: View {
if viewModel.uploadState == .done {
Image(systemName: "checkmark.circle.fill")
.foregroundStyle(.green)
.onAppear {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
dismiss()
}
}
}
if viewModel.error != nil {
Image(systemName: "xmark.circle.fill")
.foregroundStyle(.red)
.onAppear {
DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
dismiss()
}
}
}
}
.font(.largeTitle)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,19 @@ struct SendMessageView: View {
}
textField
.padding(isFocused ? [.horizontal, .bottom] : .all, .l)
if isFocused {
if isFocused || viewModel.keyboardVisible {
keyboardToolbarContent
.padding(.horizontal, .l)
.padding(.vertical, .m)
.background(.bar)
}
}
.onChange(of: isFocused, initial: true) {
viewModel.keyboardVisible = isFocused
// Don't set keyboardVisible to false automatically on iPad
// Focus with hardware keyboard is messed up, this is a workaround
if UIDevice.current.userInterfaceIdiom != .pad || isFocused {
viewModel.keyboardVisible = isFocused
}
}
.onAppear {
viewModel.performOnAppear()
Expand All @@ -58,6 +62,7 @@ struct SendMessageView: View {
if value.translation.height > 0 {
// down
isFocused = false
viewModel.keyboardVisible = false
let impactMed = UIImpactFeedbackGenerator(style: .medium)
impactMed.impactOccurred()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"selectConversation" = "Please Select a Conversation.";
"selectLecture" = "Please Select a Lecture.";
"selectExercise" = "Please Select an Exercise.";
"selectFaq" = "Please Select an FAQ.";
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public struct SelectDetailView: View {
case .communication:
R.string.localizable.selectConversation()
case .faq:
"Select faq" // TODO
R.string.localizable.selectFaq()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ private struct NotificationBell: ViewModifier {

func body(content: Content) -> some View {
content
// Prevent user from accidentally tapping buttons outside the popover while open
.disabled(isNotificationSheetPresented)
.toolbar {
ToolbarItem(placement: .navigationBarLeading) {
Button {
Expand Down

0 comments on commit dcd8570

Please sign in to comment.