Commit ae7f9689 authored by shigemi miura's avatar shigemi miura

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

NGAのポイント削除不具合修正
parent e3f92dd3
......@@ -1299,7 +1299,7 @@
CODE_SIGN_ENTITLEMENTS = Sailassist/Sailassist.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 30;
CURRENT_PROJECT_VERSION = 31;
DEVELOPMENT_ASSET_PATHS = "\"Sailassist/Preview Content\"";
DEVELOPMENT_TEAM = D2DC7QNNJ8;
ENABLE_PREVIEWS = YES;
......@@ -1345,7 +1345,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Sailassist/Sailassist.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 30;
CURRENT_PROJECT_VERSION = 31;
DEVELOPMENT_ASSET_PATHS = "\"Sailassist/Preview Content\"";
DEVELOPMENT_TEAM = D2DC7QNNJ8;
ENABLE_PREVIEWS = YES;
......@@ -1529,7 +1529,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Sailassist/Sailassist.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 30;
CURRENT_PROJECT_VERSION = 31;
DEVELOPMENT_ASSET_PATHS = "\"Sailassist/Preview Content\"";
DEVELOPMENT_TEAM = D2DC7QNNJ8;
ENABLE_PREVIEWS = YES;
......
......@@ -12,6 +12,7 @@ struct ChatView: View {
@ObservedObject var message = SharingData.message
@State var isShowMember: Bool = false
@State var isNotification = Preferences.ChatNotification
@State var isFocus: Bool = true
var body: some View {
ZStack {
......@@ -71,6 +72,7 @@ struct ChatView: View {
VStack{
Button{
selectedTabModel.isShowChangeEmrMode.toggle()
isFocus = false
}label: {
Image(systemName: "exclamationmark.triangle.fill")
.foregroundColor(.white)
......@@ -85,7 +87,10 @@ struct ChatView: View {
ChatMemberView()
}
}
ChatInputView()
.onTapGesture {
isFocus = false
}
ChatInputView(isFocus: $isFocus)
}
}
.background(ColorSet.BackgroundPrimary.color)
......
......@@ -23,6 +23,7 @@ struct ChatInputView: View {
@State var isActionSheet = false
@State var isImagePicker = false
@FocusState var isKeyboard: Bool
@Binding var isFocus: Bool
var body: some View {
VStack(spacing: 0){
......@@ -77,6 +78,7 @@ struct ChatInputView: View {
TextField("", text: $inputText, onEditingChanged: { isEdit in
sceneDelegate.tabWindow?.isHidden = isEdit
isFocus = true
})
.focused($isKeyboard)
.font(FontStyle.SupplementText.font)
......@@ -126,6 +128,11 @@ struct ChatInputView: View {
print("failure")
}
}
.onChange(of: isFocus) { focus in
if focus == false {
isKeyboard = false
}
}
}
.frame(maxHeight: 55)
.alert("Error", isPresented: $isChatAlert) {
......@@ -181,6 +188,6 @@ struct ChatInputView: View {
}
#Preview {
ChatInputView()
ChatInputView(isFocus: .constant(false))
.environmentObject(SceneDelegate())
}
......@@ -91,10 +91,7 @@ struct MapRepresentable: UIViewControllerRepresentable {
if SharingData.nga.editType == EditNgaType.deletePoint {
mapVC.updateEditArea(remove: true)
if let no = SharingData.nga.selectPoint {
SharingData.nga.editNga?.points.remove(at: no)
SharingData.nga.selectPoint = nil
}
mapVC.deleteSymbol()
mapVC.updateEditArea(remove: false)
}
......@@ -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 {
HStack {
Button(action: {
SharingData.nga.editType = EditNgaType.deletePoint
SharingData.map.isMapFree = true
}, label: {
Text("Delete")
.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