From 9a90b98fdc7d9ce797f1f83a90a2a5b97b7b8fa7 Mon Sep 17 00:00:00 2001 From: Anian Schleyer <98647423+anian03@users.noreply.github.com> Date: Sat, 30 Nov 2024 20:22:49 +0100 Subject: [PATCH 1/6] `Communication`: Fix uuids in indented messages (#242) * Increment version number * Update packages --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- Artemis/Supporting/Info.plist | 2 +- ArtemisKit/Package.swift | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Artemis.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Artemis.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 16f6ba03..007332c0 100644 --- a/Artemis.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Artemis.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,8 +15,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/ls1intum/artemis-ios-core-modules", "state" : { - "revision" : "ffa278884a4c61262a0cdc227084e838a8649c89", - "version" : "15.1.0" + "revision" : "b147f9c8d1801de13626477280a1746067fada97", + "version" : "15.1.1" } }, { diff --git a/Artemis/Supporting/Info.plist b/Artemis/Supporting/Info.plist index 901218a5..69490c06 100644 --- a/Artemis/Supporting/Info.plist +++ b/Artemis/Supporting/Info.plist @@ -21,7 +21,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 1.5.0 + 1.5.1 CFBundleVersion 1 ITSAppUsesNonExemptEncryption diff --git a/ArtemisKit/Package.swift b/ArtemisKit/Package.swift index 0b2557ac..f81b041e 100644 --- a/ArtemisKit/Package.swift +++ b/ArtemisKit/Package.swift @@ -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.1")), .package(url: "https://github.com/mac-cain13/R.swift.git", from: "7.7.0") ], targets: [ From 984c9874b5bd95861eedab0e982add995defd2ca Mon Sep 17 00:00:00 2001 From: Anian Schleyer <98647423+anian03@users.noreply.github.com> Date: Sun, 1 Dec 2024 17:07:24 +0100 Subject: [PATCH 2/6] `Dashboard`: Fix card background changing when notifications are open (#244) --- .../Sources/Notifications/Views/View+NotificationToolbar.swift | 2 -- 1 file changed, 2 deletions(-) diff --git a/ArtemisKit/Sources/Notifications/Views/View+NotificationToolbar.swift b/ArtemisKit/Sources/Notifications/Views/View+NotificationToolbar.swift index 5d8e71e1..51eafaf8 100644 --- a/ArtemisKit/Sources/Notifications/Views/View+NotificationToolbar.swift +++ b/ArtemisKit/Sources/Notifications/Views/View+NotificationToolbar.swift @@ -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 { From a81bff8bb120c7aabb80550beae6198312bd987c Mon Sep 17 00:00:00 2001 From: Anian Schleyer <98647423+anian03@users.noreply.github.com> Date: Mon, 2 Dec 2024 22:52:36 +0100 Subject: [PATCH 3/6] `Communication`: Fix exam post notifications having no target and content (#243) --- .../xcshareddata/swiftpm/Package.resolved | 6 +++--- ArtemisKit/Package.swift | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Artemis.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Artemis.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 007332c0..b5075ef9 100644 --- a/Artemis.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Artemis.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "5cadd12433353b4144bcc99fd464b53c0aa36084b12784b90706859f84dad8c5", + "originHash" : "5c8626acffff005e2642c0e07e1f755598c39323b3bb020fb01711f64303781e", "pins" : [ { "identity" : "apollon-ios-module", @@ -15,8 +15,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/ls1intum/artemis-ios-core-modules", "state" : { - "revision" : "b147f9c8d1801de13626477280a1746067fada97", - "version" : "15.1.1" + "revision" : "83a8eafae4d7b098e303aa0c06b392c505852b7f", + "version" : "15.1.2" } }, { diff --git a/ArtemisKit/Package.swift b/ArtemisKit/Package.swift index f81b041e..80a0c678 100644 --- a/ArtemisKit/Package.swift +++ b/ArtemisKit/Package.swift @@ -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.1")), + .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: [ From 3d87d0e8d2d85339cd7a88525eedce8fbc45a095 Mon Sep 17 00:00:00 2001 From: Anian Schleyer <98647423+anian03@users.noreply.github.com> Date: Mon, 2 Dec 2024 23:04:32 +0100 Subject: [PATCH 4/6] `Communication`: Fix Upload Image screen stuck on Done (#247) --- .../SendMessageImagePickerView.swift | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/ArtemisKit/Sources/Messages/Views/SendMessageViews/SendMessageImagePickerView.swift b/ArtemisKit/Sources/Messages/Views/SendMessageViews/SendMessageImagePickerView.swift index 34563f53..e6124dad 100644 --- a/ArtemisKit/Sources/Messages/Views/SendMessageViews/SendMessageImagePickerView.swift +++ b/ArtemisKit/Sources/Messages/Views/SendMessageViews/SendMessageImagePickerView.swift @@ -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 { @@ -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) From b94a624cb3bc63b5c6bde2c341460bd7fc25007c Mon Sep 17 00:00:00 2001 From: Anian Schleyer <98647423+anian03@users.noreply.github.com> Date: Mon, 2 Dec 2024 23:09:01 +0100 Subject: [PATCH 5/6] `Communication`: Fix keyboard toolbar not working with iPad hardware keyboard (#248) --- .../SendMessageViewModels/SendMessageViewModel.swift | 1 + .../Views/SendMessageViews/SendMessageView.swift | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ArtemisKit/Sources/Messages/ViewModels/SendMessageViewModels/SendMessageViewModel.swift b/ArtemisKit/Sources/Messages/ViewModels/SendMessageViewModels/SendMessageViewModel.swift index a3d8679a..f9361022 100644 --- a/ArtemisKit/Sources/Messages/ViewModels/SendMessageViewModels/SendMessageViewModel.swift +++ b/ArtemisKit/Sources/Messages/ViewModels/SendMessageViewModels/SendMessageViewModel.swift @@ -144,6 +144,7 @@ extension SendMessageViewModel { } func performOnDisappear() { + keyboardVisible = false do { if let host = userSession.institution?.baseURL?.host() { switch configuration { diff --git a/ArtemisKit/Sources/Messages/Views/SendMessageViews/SendMessageView.swift b/ArtemisKit/Sources/Messages/Views/SendMessageViews/SendMessageView.swift index b5e56e63..83ae4e96 100644 --- a/ArtemisKit/Sources/Messages/Views/SendMessageViews/SendMessageView.swift +++ b/ArtemisKit/Sources/Messages/Views/SendMessageViews/SendMessageView.swift @@ -33,7 +33,7 @@ struct SendMessageView: View { } textField .padding(isFocused ? [.horizontal, .bottom] : .all, .l) - if isFocused { + if isFocused || viewModel.keyboardVisible { keyboardToolbarContent .padding(.horizontal, .l) .padding(.vertical, .m) @@ -41,7 +41,11 @@ struct SendMessageView: View { } } .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() @@ -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() } From b782257b3b5bb722832ff206abeab42a0e5c8780 Mon Sep 17 00:00:00 2001 From: Anian Schleyer <98647423+anian03@users.noreply.github.com> Date: Mon, 2 Dec 2024 23:24:50 +0100 Subject: [PATCH 6/6] `FAQ`: Add missing localization for selecting FAQ (#249) --- .../Sources/Navigation/Resources/en.lproj/Localizable.strings | 1 + .../Navigation/SplitViewSupporting/SelectDetailView.swift | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ArtemisKit/Sources/Navigation/Resources/en.lproj/Localizable.strings b/ArtemisKit/Sources/Navigation/Resources/en.lproj/Localizable.strings index 31b41646..ccb064a6 100644 --- a/ArtemisKit/Sources/Navigation/Resources/en.lproj/Localizable.strings +++ b/ArtemisKit/Sources/Navigation/Resources/en.lproj/Localizable.strings @@ -1,3 +1,4 @@ "selectConversation" = "Please Select a Conversation."; "selectLecture" = "Please Select a Lecture."; "selectExercise" = "Please Select an Exercise."; +"selectFaq" = "Please Select an FAQ."; diff --git a/ArtemisKit/Sources/Navigation/SplitViewSupporting/SelectDetailView.swift b/ArtemisKit/Sources/Navigation/SplitViewSupporting/SelectDetailView.swift index 80a380fe..8d2fbf38 100644 --- a/ArtemisKit/Sources/Navigation/SplitViewSupporting/SelectDetailView.swift +++ b/ArtemisKit/Sources/Navigation/SplitViewSupporting/SelectDetailView.swift @@ -48,7 +48,7 @@ public struct SelectDetailView: View { case .communication: R.string.localizable.selectConversation() case .faq: - "Select faq" // TODO + R.string.localizable.selectFaq() } } }