Commit 796ecb2f authored by shigemi miura's avatar shigemi miura

チャットが停止する場合があるので、既読タイミングを変更

チャット日付ダークモード・ライトモード対応 ECAのユーザー名対応
parent 6062359d
...@@ -1307,7 +1307,7 @@ ...@@ -1307,7 +1307,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 = 47; CURRENT_PROJECT_VERSION = 48;
DEVELOPMENT_ASSET_PATHS = "\"Sailassist/Preview Content\""; DEVELOPMENT_ASSET_PATHS = "\"Sailassist/Preview Content\"";
DEVELOPMENT_TEAM = D2DC7QNNJ8; DEVELOPMENT_TEAM = D2DC7QNNJ8;
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
...@@ -1353,7 +1353,7 @@ ...@@ -1353,7 +1353,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 = 47; CURRENT_PROJECT_VERSION = 48;
DEVELOPMENT_ASSET_PATHS = "\"Sailassist/Preview Content\""; DEVELOPMENT_ASSET_PATHS = "\"Sailassist/Preview Content\"";
DEVELOPMENT_TEAM = D2DC7QNNJ8; DEVELOPMENT_TEAM = D2DC7QNNJ8;
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
...@@ -1536,7 +1536,7 @@ ...@@ -1536,7 +1536,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 = 47; CURRENT_PROJECT_VERSION = 48;
DEVELOPMENT_ASSET_PATHS = "\"Sailassist/Preview Content\""; DEVELOPMENT_ASSET_PATHS = "\"Sailassist/Preview Content\"";
DEVELOPMENT_TEAM = D2DC7QNNJ8; DEVELOPMENT_TEAM = D2DC7QNNJ8;
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
"color-space" : "srgb", "color-space" : "srgb",
"components" : { "components" : {
"alpha" : "1.000", "alpha" : "1.000",
"blue" : "0x7E", "blue" : "0x49",
"green" : "0x7E", "green" : "0x49",
"red" : "0x7E" "red" : "0x49"
} }
}, },
"idiom" : "universal" "idiom" : "universal"
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
"color-space" : "srgb", "color-space" : "srgb",
"components" : { "components" : {
"alpha" : "1.000", "alpha" : "1.000",
"blue" : "0xAF", "blue" : "0xDE",
"green" : "0xAF", "green" : "0xDE",
"red" : "0xAF" "red" : "0xDE"
} }
}, },
"idiom" : "universal" "idiom" : "universal"
......
...@@ -16,14 +16,14 @@ struct ChatView: View { ...@@ -16,14 +16,14 @@ struct ChatView: View {
var body: some View { var body: some View {
ZStack { ZStack {
if message.mode == true{ if message.mode == true {
LinearGradient(gradient: Gradient(colors: [.chatEmargencyColor1, .chatEmargencyColor2]), startPoint: .top, endPoint: .bottom) LinearGradient(gradient: Gradient(colors: [.chatEmargencyColor1, .chatEmargencyColor2]), startPoint: .top, endPoint: .bottom)
.ignoresSafeArea() .ignoresSafeArea()
} }
VStack(spacing: 0){ VStack(spacing: 0) {
ChatTitleView(isShowMember: $isShowMember, isNotification: $isNotification) ChatTitleView(isShowMember: $isShowMember, isNotification: $isNotification)
ZStack{ ZStack {
ScrollViewReader { proxy in ScrollViewReader { proxy in
ScrollView(.vertical) { ScrollView(.vertical) {
VStack { VStack {
...@@ -60,21 +60,16 @@ struct ChatView: View { ...@@ -60,21 +60,16 @@ struct ChatView: View {
//Warrningモードは既読は返さない //Warrningモードは既読は返さない
if message.messages.last?.message != nil { if message.messages.last?.message != nil {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
let getMessage = GetMessage() let getMessage = GetMessage()
getMessage.readNotification() getMessage.readNotification()
} }
}
message.viewCnt = 0 message.viewCnt = 0
} }
} }
} }
.onChange(of: message.mode) { newValue in
withAnimation {
if let id = message.messages.last?.messageId {
proxy.scrollTo(id, anchor: .bottom)
}
}
}
.onReceive(message.$messages) { (value) in .onReceive(message.$messages) { (value) in
withAnimation { withAnimation {
guard !value.isEmpty else {return} guard !value.isEmpty else {return}
...@@ -128,7 +123,7 @@ struct AlertChatMessage: View { ...@@ -128,7 +123,7 @@ struct AlertChatMessage: View {
.frame(width: 20, height: 1) .frame(width: 20, height: 1)
Text("Warrning mode start " + DateTextLib.ISO86012FormatText(message.time, format: "yyyy/MM/dd HH:mm", errFormat: "")) Text("Warrning mode start " + DateTextLib.ISO86012FormatText(message.time, format: "yyyy/MM/dd HH:mm", errFormat: ""))
.font(FontStyle.DateText.font) .font(FontStyle.DateText.font)
.foregroundColor(ColorSet.BodyDescriptiion.color) .foregroundColor(ColorSet.ChatDate.color)
Rectangle() Rectangle()
.fill(colorScheme == .light ? .black : .white) .fill(colorScheme == .light ? .black : .white)
.frame(width: 20, height: 1) .frame(width: 20, height: 1)
......
...@@ -59,7 +59,7 @@ struct MyChatContentView: View { ...@@ -59,7 +59,7 @@ struct MyChatContentView: View {
Text(String(viewerCnt.0)) Text(String(viewerCnt.0))
} }
.font(FontStyle.DateText.font) .font(FontStyle.DateText.font)
.foregroundColor(ColorSet.BodyDescriptiion.color) .foregroundColor(ColorSet.ChatDate.color)
} }
.padding(.trailing, 20) .padding(.trailing, 20)
} }
......
...@@ -165,7 +165,7 @@ class SharingData{ ...@@ -165,7 +165,7 @@ class SharingData{
task.id = value.id task.id = value.id
task.areaId = value.areaId task.areaId = value.areaId
task.userName = value.userName task.userName = value.userName
task.taskName = value.name task.taskName = Preferences.UserName
task.noticeRange = value.swNotice task.noticeRange = value.swNotice
task.startRange = value.swStart task.startRange = value.swStart
task.finishRange = value.swFinish task.finishRange = value.swFinish
...@@ -178,7 +178,7 @@ class SharingData{ ...@@ -178,7 +178,7 @@ class SharingData{
task.id = value.id task.id = value.id
task.areaId = value.areaId task.areaId = value.areaId
task.userName = value.userName task.userName = value.userName
task.taskName = value.name task.taskName = Preferences.UserName
task.noticeRange = value.swNotice task.noticeRange = value.swNotice
task.startRange = value.swStart task.startRange = value.swStart
task.finishRange = value.swFinish task.finishRange = value.swFinish
...@@ -190,7 +190,7 @@ class SharingData{ ...@@ -190,7 +190,7 @@ class SharingData{
case EcaOperation.Finish: case EcaOperation.Finish:
task.id = value.id task.id = value.id
task.areaId = value.areaId task.areaId = value.areaId
task.userName = value.userName task.userName = Preferences.UserName
task.taskName = value.name task.taskName = value.name
task.noticeRange = value.swNotice task.noticeRange = value.swNotice
task.startRange = value.swStart task.startRange = value.swStart
...@@ -203,7 +203,7 @@ class SharingData{ ...@@ -203,7 +203,7 @@ class SharingData{
case EcaOperation.End: case EcaOperation.End:
task.id = value.id task.id = value.id
task.areaId = value.areaId task.areaId = value.areaId
task.userName = value.userName task.userName = Preferences.UserName
task.taskName = value.name task.taskName = value.name
task.noticeRange = value.swNotice task.noticeRange = value.swNotice
task.startRange = value.swStart task.startRange = value.swStart
...@@ -216,7 +216,7 @@ class SharingData{ ...@@ -216,7 +216,7 @@ class SharingData{
case EcaOperation.Incomplete: case EcaOperation.Incomplete:
task.id = value.id task.id = value.id
task.areaId = value.areaId task.areaId = value.areaId
task.userName = value.userName task.userName = Preferences.UserName
task.taskName = value.name task.taskName = value.name
task.noticeRange = value.swNotice task.noticeRange = value.swNotice
task.startRange = value.swStart task.startRange = value.swStart
...@@ -229,7 +229,7 @@ class SharingData{ ...@@ -229,7 +229,7 @@ class SharingData{
case EcaOperation.Cancel: case EcaOperation.Cancel:
task.id = value.id task.id = value.id
task.areaId = value.areaId task.areaId = value.areaId
task.userName = value.userName task.userName = Preferences.UserName
task.taskName = value.name task.taskName = value.name
task.noticeRange = value.swNotice task.noticeRange = value.swNotice
task.startRange = value.swStart task.startRange = value.swStart
...@@ -242,7 +242,7 @@ class SharingData{ ...@@ -242,7 +242,7 @@ class SharingData{
case EcaOperation.Change: case EcaOperation.Change:
task.id = value.id task.id = value.id
task.areaId = value.areaId task.areaId = value.areaId
task.userName = value.userName task.userName = Preferences.UserName
task.taskName = value.name task.taskName = value.name
task.noticeRange = value.swNotice task.noticeRange = value.swNotice
task.startRange = value.swStart task.startRange = value.swStart
......
...@@ -219,6 +219,7 @@ struct CustomTabBar: View { ...@@ -219,6 +219,7 @@ struct CustomTabBar: View {
let signalRService = SignalR() let signalRService = SignalR()
signalRService.chatMode(mode: chatMode, completion: responseChatMode) signalRService.chatMode(mode: chatMode, completion: responseChatMode)
SharingData.message.sendInf = true SharingData.message.sendInf = true
SharingData.message.mode = chatMode
DispatchQueue.main.asyncAfter(deadline: .now() + 3.0) { DispatchQueue.main.asyncAfter(deadline: .now() + 3.0) {
restartChatMode() restartChatMode()
......
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