Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
Sailassist
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CpjJwWHV
Sailassist
Commits
71f416a7
Commit
71f416a7
authored
Jul 23, 2024
by
shigemi miura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NGAで50点以上は+が表示されないように修正
チャット通知OFF処理変更
parent
ec125999
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
16 additions
and
37 deletions
+16
-37
ChatInputView.swift
Seilassist/Sailassist/Chat/View/ChatInputView.swift
+0
-1
ChatTitleView.swift
Seilassist/Sailassist/Chat/View/ChatTitleView.swift
+3
-1
EcaTask.swift
Seilassist/Sailassist/ECA/EcaTask.swift
+1
-3
LocationViewModel.swift
Seilassist/Sailassist/LocationViewModel.swift
+1
-1
MapRepresentable.swift
Seilassist/Sailassist/Map/MapRepresentable.swift
+5
-5
GetNgaList.swift
Seilassist/Sailassist/NGA/GetNgaList.swift
+0
-2
SailassistApp.swift
Seilassist/Sailassist/SailassistApp.swift
+6
-21
SessionNgaList.swift
Seilassist/Sailassist/ServerSession/SessionNgaList.swift
+0
-2
SessionShipStatus.swift
Seilassist/Sailassist/ServerSession/SessionShipStatus.swift
+0
-1
No files found.
Seilassist/Sailassist/Chat/View/ChatInputView.swift
View file @
71f416a7
...
@@ -177,7 +177,6 @@ struct ChatInputView: View {
...
@@ -177,7 +177,6 @@ struct ChatInputView: View {
*/
*/
func
responseChatMessage
(
error
:
Error
?)
{
func
responseChatMessage
(
error
:
Error
?)
{
if
let
e
=
error
{
if
let
e
=
error
{
print
(
debug
:
"Error chat:
\(
e
)
"
)
msg
.
messages
.
removeLast
()
//最後に追加したメッセージを削除
msg
.
messages
.
removeLast
()
//最後に追加したメッセージを削除
isChatAlert
=
true
isChatAlert
=
true
}
else
{
}
else
{
...
...
Seilassist/Sailassist/Chat/View/ChatTitleView.swift
View file @
71f416a7
...
@@ -91,7 +91,9 @@ struct ChatTitleView: View {
...
@@ -91,7 +91,9 @@ struct ChatTitleView: View {
isNotification
.
toggle
()
isNotification
.
toggle
()
Preferences
.
ChatNotification
=
isNotification
Preferences
.
ChatNotification
=
isNotification
print
(
debug
:
"Test:
\(
isNotification
)
"
)
let
notificationTags
=
NotificationTags
()
notificationTags
.
addTags
()
return
isNotification
return
isNotification
}
}
}
}
...
...
Seilassist/Sailassist/ECA/EcaTask.swift
View file @
71f416a7
...
@@ -13,7 +13,6 @@ class EcaTask {
...
@@ -13,7 +13,6 @@ class EcaTask {
var
eca
=
SharingData
.
eca
var
eca
=
SharingData
.
eca
func
start
()
{
func
start
()
{
print
(
debug
:
"called"
)
sessionShipStatus
.
RequestShipStatus
(
responseShipStatus
)
sessionShipStatus
.
RequestShipStatus
(
responseShipStatus
)
}
}
...
@@ -33,7 +32,6 @@ class EcaTask {
...
@@ -33,7 +32,6 @@ class EcaTask {
}
}
func
responseShipStatus
(
result
:
Result
<
Data
,
APIError
>
)
{
func
responseShipStatus
(
result
:
Result
<
Data
,
APIError
>
)
{
print
(
debug
:
"called"
)
switch
result
{
switch
result
{
case
.
success
(
let
resultData
):
case
.
success
(
let
resultData
):
let
serverSession
=
ServerSession
()
let
serverSession
=
ServerSession
()
...
@@ -48,7 +46,7 @@ class EcaTask {
...
@@ -48,7 +46,7 @@ class EcaTask {
SharingData
.
location
.
dataTime
=
res
.
dataTime
//2023-11-02T05:25:49.4362123Z
SharingData
.
location
.
dataTime
=
res
.
dataTime
//2023-11-02T05:25:49.4362123Z
SharingData
.
location
.
setLocation
()
SharingData
.
location
.
setLocation
()
print
(
debug
:
"Location:
\(
res
)
"
)
//
print(debug: "Location:\(res)")
}
}
case
.
failure
(
let
errorCode
):
case
.
failure
(
let
errorCode
):
print
(
debug
:
errorCode
)
print
(
debug
:
errorCode
)
...
...
Seilassist/Sailassist/LocationViewModel.swift
View file @
71f416a7
...
@@ -83,7 +83,7 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
...
@@ -83,7 +83,7 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
ngaList
.
start
()
ngaList
.
start
()
if
let
newLocation
=
locations
.
first
{
if
let
newLocation
=
locations
.
first
{
print
(
debug
:
"called locationManager"
)
//
print(debug: "called locationManager")
lastSeenLocation
=
newLocation
lastSeenLocation
=
newLocation
let
targetCoordinate
:
CLLocationCoordinate2D
=
lastSeenLocation
!.
coordinate
let
targetCoordinate
:
CLLocationCoordinate2D
=
lastSeenLocation
!.
coordinate
SharingData
.
location
.
gps
=
targetCoordinate
SharingData
.
location
.
gps
=
targetCoordinate
...
...
Seilassist/Sailassist/Map/MapRepresentable.swift
View file @
71f416a7
...
@@ -733,18 +733,18 @@ class MapViewController : UIViewController {
...
@@ -733,18 +733,18 @@ class MapViewController : UIViewController {
}
}
var
areaPoints
:
[
CLLocationCoordinate2D
]
=
[]
var
areaPoints
:
[
CLLocationCoordinate2D
]
=
[]
if
remove
==
true
{
updateEditAreaFill
(
points
:
areaPoints
,
remove
:
remove
)
updateEditAreaAddSymbol
(
points
:
areaPoints
,
remove
:
remove
)
}
else
{
if
area
.
points
.
count
>=
3
{
if
area
.
points
.
count
>=
3
{
areaPoints
=
area
.
points
areaPoints
=
area
.
points
areaPoints
.
append
(
area
.
points
[
0
])
areaPoints
.
append
(
area
.
points
[
0
])
updateEditAreaFill
(
points
:
areaPoints
,
remove
:
true
)
updateEditAreaFill
(
points
:
areaPoints
,
remove
:
true
)
updateEditAreaFill
(
points
:
areaPoints
,
remove
:
false
)
updateEditAreaFill
(
points
:
areaPoints
,
remove
:
false
)
updateEditAreaAddSymbol
(
points
:
areaPoints
,
remove
:
false
)
var
isAddSymbol
=
false
if
area
.
points
.
count
>=
ngaAreaPointMax
{
isAddSymbol
=
true
}
}
updateEditAreaAddSymbol
(
points
:
areaPoints
,
remove
:
isAddSymbol
)
}
}
}
}
}
}
...
...
Seilassist/Sailassist/NGA/GetNgaList.swift
View file @
71f416a7
...
@@ -14,12 +14,10 @@ class GetNgaList {
...
@@ -14,12 +14,10 @@ class GetNgaList {
var
sessionNgaList
=
SessionNgaList
()
var
sessionNgaList
=
SessionNgaList
()
func
start
()
{
func
start
()
{
print
(
debug
:
"called"
)
sessionNgaList
.
RequestGetNgaList
(
responseGetNgaList
)
sessionNgaList
.
RequestGetNgaList
(
responseGetNgaList
)
}
}
private
func
responseGetNgaList
(
result
:
Result
<
Data
,
APIError
>
)
{
private
func
responseGetNgaList
(
result
:
Result
<
Data
,
APIError
>
)
{
print
(
debug
:
"called"
)
switch
result
{
switch
result
{
case
.
success
(
let
resultData
):
case
.
success
(
let
resultData
):
let
serverSession
=
ServerSession
()
let
serverSession
=
ServerSession
()
...
...
Seilassist/Sailassist/SailassistApp.swift
View file @
71f416a7
...
@@ -71,9 +71,13 @@ class NotificationTags: NSObject {
...
@@ -71,9 +71,13 @@ class NotificationTags: NSObject {
let
chatTag
=
"chat-"
+
shipId
let
chatTag
=
"chat-"
+
shipId
let
emergencyTag
=
"emergency-"
+
shipId
let
emergencyTag
=
"emergency-"
+
shipId
if
Preferences
.
ChatNotification
==
false
{
MSNotificationHub
.
addTags
([
routeTag
,
bamTag
,
taskAlertTag
,
sailassistTag
,
emergencyTag
])
}
else
{
MSNotificationHub
.
addTags
([
routeTag
,
bamTag
,
taskAlertTag
,
sailassistTag
,
emergencyTag
,
chatTag
])
MSNotificationHub
.
addTags
([
routeTag
,
bamTag
,
taskAlertTag
,
sailassistTag
,
emergencyTag
,
chatTag
])
}
}
}
}
}
}
}
var
connection
:
HubConnection
?
var
connection
:
HubConnection
?
...
@@ -331,28 +335,18 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
...
@@ -331,28 +335,18 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
let
strTitle
=
arrAlert
[
"title"
]
as?
String
??
""
//船名
let
strTitle
=
arrAlert
[
"title"
]
as?
String
??
""
//船名
let
strBody
=
arrAlert
[
"body"
]
as?
String
??
""
//送信内容
let
strBody
=
arrAlert
[
"body"
]
as?
String
??
""
//送信内容
print
(
debug
:
"called
\(
subtitle
)
\(
strTitle
)
\(
strBody
)
"
)
//
print(debug: "called \(subtitle) \(strTitle) \(strBody)")
if
strTitle
==
"Chat Warning"
{
if
strTitle
==
"Chat Warning"
{
if
SharingData
.
message
.
mode
{
if
SharingData
.
message
.
mode
{
let
message
=
GetMessage
()
message
.
start
()
return
return
}
}
}
}
let
message
=
GetMessage
()
message
.
start
()
//送信先名称が同一の場合は通知を出さない
//送信先名称が同一の場合は通知を出さない
if
subtitle
==
Preferences
.
UserName
{
if
subtitle
==
Preferences
.
UserName
{
return
return
}
}
//チャット通知OFF
if
Preferences
.
ChatNotification
==
false
{
return
}
case
"sailassist"
:
case
"sailassist"
:
print
(
debug
:
"sailassist"
)
print
(
debug
:
"sailassist"
)
SharingData
.
pushHistory
.
viewCnt
+=
1
SharingData
.
pushHistory
.
viewCnt
+=
1
...
@@ -385,7 +379,6 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
...
@@ -385,7 +379,6 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
didReceive
response
:
UNNotificationResponse
,
didReceive
response
:
UNNotificationResponse
,
withCompletionHandler
completionHandler
:
@escaping
()
->
Void
)
{
withCompletionHandler
completionHandler
:
@escaping
()
->
Void
)
{
let
userInfo
=
response
.
notification
.
request
.
content
.
userInfo
let
userInfo
=
response
.
notification
.
request
.
content
.
userInfo
print
(
debug
:
userInfo
)
if
!
userInfo
.
isEmpty
{
if
!
userInfo
.
isEmpty
{
guard
let
arrAPS
=
userInfo
[
"aps"
]
as?
[
String
:
Any
]
else
{
guard
let
arrAPS
=
userInfo
[
"aps"
]
as?
[
String
:
Any
]
else
{
completionHandler
()
completionHandler
()
...
@@ -403,15 +396,7 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
...
@@ -403,15 +396,7 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
let
strTitle
=
arrAlert
[
"title"
]
as?
String
??
""
//船名
let
strTitle
=
arrAlert
[
"title"
]
as?
String
??
""
//船名
let
strBody
=
arrAlert
[
"body"
]
as?
String
??
""
//送信先名称
let
strBody
=
arrAlert
[
"body"
]
as?
String
??
""
//送信先名称
print
(
debug
:
"called
\(
subtitle
)
\(
strTitle
)
\(
strBody
)
"
)
// print(debug: "called \(subtitle) \(strTitle) \(strBody)")
let
message
=
GetMessage
()
message
.
start
()
//チャット通知OFF
if
Preferences
.
ChatNotification
==
false
{
return
}
case
"sailassist"
:
case
"sailassist"
:
print
(
debug
:
"sailassist"
)
print
(
debug
:
"sailassist"
)
SharingData
.
pushHistory
.
viewCnt
+=
1
SharingData
.
pushHistory
.
viewCnt
+=
1
...
...
Seilassist/Sailassist/ServerSession/SessionNgaList.swift
View file @
71f416a7
...
@@ -20,7 +20,6 @@ class SessionNgaList : ObservableObject {
...
@@ -20,7 +20,6 @@ class SessionNgaList : ObservableObject {
* タスクリスト取得
* タスクリスト取得
*/
*/
func
RequestGetNgaList
(
_
completion
:
@escaping
((
Result
<
Data
,
APIError
>
))
->
Void
)
{
func
RequestGetNgaList
(
_
completion
:
@escaping
((
Result
<
Data
,
APIError
>
))
->
Void
)
{
print
(
debug
:
"calld"
)
if
Calling
{
if
Calling
{
return
return
}
}
...
@@ -44,7 +43,6 @@ class SessionNgaList : ObservableObject {
...
@@ -44,7 +43,6 @@ class SessionNgaList : ObservableObject {
* タスク保存
* タスク保存
*/
*/
func
RequestPostNgaList
(
_
nga
:
ReqNgaList
,
completion
:
@escaping
((
Result
<
Data
,
APIError
>
))
->
Void
)
{
func
RequestPostNgaList
(
_
nga
:
ReqNgaList
,
completion
:
@escaping
((
Result
<
Data
,
APIError
>
))
->
Void
)
{
print
(
debug
:
"calld"
)
if
Calling
{
if
Calling
{
return
return
}
}
...
...
Seilassist/Sailassist/ServerSession/SessionShipStatus.swift
View file @
71f416a7
...
@@ -20,7 +20,6 @@ class SessionShipStatus : ObservableObject {
...
@@ -20,7 +20,6 @@ class SessionShipStatus : ObservableObject {
* 船情報
* 船情報
*/
*/
func
RequestShipStatus
(
_
completion
:
@escaping
((
Result
<
Data
,
APIError
>
))
->
Void
)
{
func
RequestShipStatus
(
_
completion
:
@escaping
((
Result
<
Data
,
APIError
>
))
->
Void
)
{
print
(
debug
:
"calld"
)
if
Calling
{
if
Calling
{
return
return
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment