Commit ae7f9689 authored by shigemi miura's avatar shigemi miura

チャットのキーボード処理変更

NGAのポイント削除不具合修正
parent e3f92dd3
...@@ -1299,7 +1299,7 @@ ...@@ -1299,7 +1299,7 @@
CODE_SIGN_ENTITLEMENTS = Sailassist/Sailassist.entitlements; CODE_SIGN_ENTITLEMENTS = Sailassist/Sailassist.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 30; CURRENT_PROJECT_VERSION = 31;
DEVELOPMENT_ASSET_PATHS = "\"Sailassist/Preview Content\""; DEVELOPMENT_ASSET_PATHS = "\"Sailassist/Preview Content\"";
DEVELOPMENT_TEAM = D2DC7QNNJ8; DEVELOPMENT_TEAM = D2DC7QNNJ8;
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
...@@ -1345,7 +1345,7 @@ ...@@ -1345,7 +1345,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Sailassist/Sailassist.entitlements; CODE_SIGN_ENTITLEMENTS = Sailassist/Sailassist.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 30; CURRENT_PROJECT_VERSION = 31;
DEVELOPMENT_ASSET_PATHS = "\"Sailassist/Preview Content\""; DEVELOPMENT_ASSET_PATHS = "\"Sailassist/Preview Content\"";
DEVELOPMENT_TEAM = D2DC7QNNJ8; DEVELOPMENT_TEAM = D2DC7QNNJ8;
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
...@@ -1529,7 +1529,7 @@ ...@@ -1529,7 +1529,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Sailassist/Sailassist.entitlements; CODE_SIGN_ENTITLEMENTS = Sailassist/Sailassist.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 30; CURRENT_PROJECT_VERSION = 31;
DEVELOPMENT_ASSET_PATHS = "\"Sailassist/Preview Content\""; DEVELOPMENT_ASSET_PATHS = "\"Sailassist/Preview Content\"";
DEVELOPMENT_TEAM = D2DC7QNNJ8; DEVELOPMENT_TEAM = D2DC7QNNJ8;
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
......
...@@ -12,6 +12,7 @@ struct ChatView: View { ...@@ -12,6 +12,7 @@ struct ChatView: View {
@ObservedObject var message = SharingData.message @ObservedObject var message = SharingData.message
@State var isShowMember: Bool = false @State var isShowMember: Bool = false
@State var isNotification = Preferences.ChatNotification @State var isNotification = Preferences.ChatNotification
@State var isFocus: Bool = true
var body: some View { var body: some View {
ZStack { ZStack {
...@@ -71,6 +72,7 @@ struct ChatView: View { ...@@ -71,6 +72,7 @@ struct ChatView: View {
VStack{ VStack{
Button{ Button{
selectedTabModel.isShowChangeEmrMode.toggle() selectedTabModel.isShowChangeEmrMode.toggle()
isFocus = false
}label: { }label: {
Image(systemName: "exclamationmark.triangle.fill") Image(systemName: "exclamationmark.triangle.fill")
.foregroundColor(.white) .foregroundColor(.white)
...@@ -85,7 +87,10 @@ struct ChatView: View { ...@@ -85,7 +87,10 @@ struct ChatView: View {
ChatMemberView() ChatMemberView()
} }
} }
ChatInputView() .onTapGesture {
isFocus = false
}
ChatInputView(isFocus: $isFocus)
} }
} }
.background(ColorSet.BackgroundPrimary.color) .background(ColorSet.BackgroundPrimary.color)
......
...@@ -23,6 +23,7 @@ struct ChatInputView: View { ...@@ -23,6 +23,7 @@ struct ChatInputView: View {
@State var isActionSheet = false @State var isActionSheet = false
@State var isImagePicker = false @State var isImagePicker = false
@FocusState var isKeyboard: Bool @FocusState var isKeyboard: Bool
@Binding var isFocus: Bool
var body: some View { var body: some View {
VStack(spacing: 0){ VStack(spacing: 0){
...@@ -77,6 +78,7 @@ struct ChatInputView: View { ...@@ -77,6 +78,7 @@ struct ChatInputView: View {
TextField("", text: $inputText, onEditingChanged: { isEdit in TextField("", text: $inputText, onEditingChanged: { isEdit in
sceneDelegate.tabWindow?.isHidden = isEdit sceneDelegate.tabWindow?.isHidden = isEdit
isFocus = true
}) })
.focused($isKeyboard) .focused($isKeyboard)
.font(FontStyle.SupplementText.font) .font(FontStyle.SupplementText.font)
...@@ -126,6 +128,11 @@ struct ChatInputView: View { ...@@ -126,6 +128,11 @@ struct ChatInputView: View {
print("failure") print("failure")
} }
} }
.onChange(of: isFocus) { focus in
if focus == false {
isKeyboard = false
}
}
} }
.frame(maxHeight: 55) .frame(maxHeight: 55)
.alert("Error", isPresented: $isChatAlert) { .alert("Error", isPresented: $isChatAlert) {
...@@ -181,6 +188,6 @@ struct ChatInputView: View { ...@@ -181,6 +188,6 @@ struct ChatInputView: View {
} }
#Preview { #Preview {
ChatInputView() ChatInputView(isFocus: .constant(false))
.environmentObject(SceneDelegate()) .environmentObject(SceneDelegate())
} }
...@@ -91,10 +91,7 @@ struct MapRepresentable: UIViewControllerRepresentable { ...@@ -91,10 +91,7 @@ struct MapRepresentable: UIViewControllerRepresentable {
if SharingData.nga.editType == EditNgaType.deletePoint { if SharingData.nga.editType == EditNgaType.deletePoint {
mapVC.updateEditArea(remove: true) mapVC.updateEditArea(remove: true)
if let no = SharingData.nga.selectPoint { mapVC.deleteSymbol()
SharingData.nga.editNga?.points.remove(at: no)
SharingData.nga.selectPoint = nil
}
mapVC.updateEditArea(remove: false) mapVC.updateEditArea(remove: false)
} }
...@@ -1231,6 +1228,17 @@ class MapViewController : UIViewController { ...@@ -1231,6 +1228,17 @@ class MapViewController : UIViewController {
} }
} }
/**
* ポイント削除(後処理)
*/
func deleteSymbol() {
if let no = SharingData.nga.selectPoint {
SharingData.nga.editNga?.points.remove(at: no)
SharingData.nga.selectPoint = nil
}
SharingData.nga.editType = EditNgaType.addPoint
}
/** /**
* 地図上ドラッグ * 地図上ドラッグ
*/ */
......
...@@ -237,6 +237,7 @@ struct NgaPointSetting: View { ...@@ -237,6 +237,7 @@ struct NgaPointSetting: View {
HStack { HStack {
Button(action: { Button(action: {
SharingData.nga.editType = EditNgaType.deletePoint SharingData.nga.editType = EditNgaType.deletePoint
SharingData.map.isMapFree = true
}, label: { }, label: {
Text("Delete") Text("Delete")
.font(FontStyle.DefaultText.font) .font(FontStyle.DefaultText.font)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment