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
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
44 deletions
+23
-44
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
+11
-11
GetNgaList.swift
Seilassist/Sailassist/NGA/GetNgaList.swift
+0
-2
SailassistApp.swift
Seilassist/Sailassist/SailassistApp.swift
+7
-22
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 {
*/
func
responseChatMessage
(
error
:
Error
?)
{
if
let
e
=
error
{
print
(
debug
:
"Error chat:
\(
e
)
"
)
msg
.
messages
.
removeLast
()
//最後に追加したメッセージを削除
isChatAlert
=
true
}
else
{
...
...
Seilassist/Sailassist/Chat/View/ChatTitleView.swift
View file @
71f416a7
...
...
@@ -91,7 +91,9 @@ struct ChatTitleView: View {
isNotification
.
toggle
()
Preferences
.
ChatNotification
=
isNotification
print
(
debug
:
"Test:
\(
isNotification
)
"
)
let
notificationTags
=
NotificationTags
()
notificationTags
.
addTags
()
return
isNotification
}
}
...
...
Seilassist/Sailassist/ECA/EcaTask.swift
View file @
71f416a7
...
...
@@ -13,7 +13,6 @@ class EcaTask {
var
eca
=
SharingData
.
eca
func
start
()
{
print
(
debug
:
"called"
)
sessionShipStatus
.
RequestShipStatus
(
responseShipStatus
)
}
...
...
@@ -33,7 +32,6 @@ class EcaTask {
}
func
responseShipStatus
(
result
:
Result
<
Data
,
APIError
>
)
{
print
(
debug
:
"called"
)
switch
result
{
case
.
success
(
let
resultData
):
let
serverSession
=
ServerSession
()
...
...
@@ -48,7 +46,7 @@ class EcaTask {
SharingData
.
location
.
dataTime
=
res
.
dataTime
//2023-11-02T05:25:49.4362123Z
SharingData
.
location
.
setLocation
()
print
(
debug
:
"Location:
\(
res
)
"
)
//
print(debug: "Location:\(res)")
}
case
.
failure
(
let
errorCode
):
print
(
debug
:
errorCode
)
...
...
Seilassist/Sailassist/LocationViewModel.swift
View file @
71f416a7
...
...
@@ -83,7 +83,7 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
ngaList
.
start
()
if
let
newLocation
=
locations
.
first
{
print
(
debug
:
"called locationManager"
)
//
print(debug: "called locationManager")
lastSeenLocation
=
newLocation
let
targetCoordinate
:
CLLocationCoordinate2D
=
lastSeenLocation
!.
coordinate
SharingData
.
location
.
gps
=
targetCoordinate
...
...
Seilassist/Sailassist/Map/MapRepresentable.swift
View file @
71f416a7
...
...
@@ -733,18 +733,18 @@ class MapViewController : UIViewController {
}
var
areaPoints
:
[
CLLocationCoordinate2D
]
=
[]
if
remove
==
true
{
updateEditAreaFill
(
points
:
areaPoints
,
remove
:
remove
)
updateEditAreaAddSymbol
(
points
:
areaPoints
,
remove
:
remove
)
}
else
{
if
area
.
points
.
count
>=
3
{
areaPoints
=
area
.
points
areaPoints
.
append
(
area
.
points
[
0
])
updateEditAreaFill
(
points
:
areaPoints
,
remove
:
true
)
updateEditAreaFill
(
points
:
areaPoints
,
remove
:
false
)
updateEditAreaAddSymbol
(
points
:
areaPoints
,
remove
:
false
)
if
area
.
points
.
count
>=
3
{
areaPoints
=
area
.
points
areaPoints
.
append
(
area
.
points
[
0
])
updateEditAreaFill
(
points
:
areaPoints
,
remove
:
true
)
updateEditAreaFill
(
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 {
var
sessionNgaList
=
SessionNgaList
()
func
start
()
{
print
(
debug
:
"called"
)
sessionNgaList
.
RequestGetNgaList
(
responseGetNgaList
)
}
private
func
responseGetNgaList
(
result
:
Result
<
Data
,
APIError
>
)
{
print
(
debug
:
"called"
)
switch
result
{
case
.
success
(
let
resultData
):
let
serverSession
=
ServerSession
()
...
...
Seilassist/Sailassist/SailassistApp.swift
View file @
71f416a7
...
...
@@ -71,7 +71,11 @@ class NotificationTags: NSObject {
let
chatTag
=
"chat-"
+
shipId
let
emergencyTag
=
"emergency-"
+
shipId
MSNotificationHub
.
addTags
([
routeTag
,
bamTag
,
taskAlertTag
,
sailassistTag
,
emergencyTag
,
chatTag
])
if
Preferences
.
ChatNotification
==
false
{
MSNotificationHub
.
addTags
([
routeTag
,
bamTag
,
taskAlertTag
,
sailassistTag
,
emergencyTag
])
}
else
{
MSNotificationHub
.
addTags
([
routeTag
,
bamTag
,
taskAlertTag
,
sailassistTag
,
emergencyTag
,
chatTag
])
}
}
}
}
...
...
@@ -331,28 +335,18 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
let
strTitle
=
arrAlert
[
"title"
]
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
SharingData
.
message
.
mode
{
let
message
=
GetMessage
()
message
.
start
()
return
}
}
let
message
=
GetMessage
()
message
.
start
()
//送信先名称が同一の場合は通知を出さない
if
subtitle
==
Preferences
.
UserName
{
return
}
//チャット通知OFF
if
Preferences
.
ChatNotification
==
false
{
return
}
case
"sailassist"
:
print
(
debug
:
"sailassist"
)
SharingData
.
pushHistory
.
viewCnt
+=
1
...
...
@@ -385,7 +379,6 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
didReceive
response
:
UNNotificationResponse
,
withCompletionHandler
completionHandler
:
@escaping
()
->
Void
)
{
let
userInfo
=
response
.
notification
.
request
.
content
.
userInfo
print
(
debug
:
userInfo
)
if
!
userInfo
.
isEmpty
{
guard
let
arrAPS
=
userInfo
[
"aps"
]
as?
[
String
:
Any
]
else
{
completionHandler
()
...
...
@@ -403,15 +396,7 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
let
strTitle
=
arrAlert
[
"title"
]
as?
String
??
""
//船名
let
strBody
=
arrAlert
[
"body"
]
as?
String
??
""
//送信先名称
print
(
debug
:
"called
\(
subtitle
)
\(
strTitle
)
\(
strBody
)
"
)
let
message
=
GetMessage
()
message
.
start
()
//チャット通知OFF
if
Preferences
.
ChatNotification
==
false
{
return
}
// print(debug: "called \(subtitle) \(strTitle) \(strBody)")
case
"sailassist"
:
print
(
debug
:
"sailassist"
)
SharingData
.
pushHistory
.
viewCnt
+=
1
...
...
Seilassist/Sailassist/ServerSession/SessionNgaList.swift
View file @
71f416a7
...
...
@@ -20,7 +20,6 @@ class SessionNgaList : ObservableObject {
* タスクリスト取得
*/
func
RequestGetNgaList
(
_
completion
:
@escaping
((
Result
<
Data
,
APIError
>
))
->
Void
)
{
print
(
debug
:
"calld"
)
if
Calling
{
return
}
...
...
@@ -44,7 +43,6 @@ class SessionNgaList : ObservableObject {
* タスク保存
*/
func
RequestPostNgaList
(
_
nga
:
ReqNgaList
,
completion
:
@escaping
((
Result
<
Data
,
APIError
>
))
->
Void
)
{
print
(
debug
:
"calld"
)
if
Calling
{
return
}
...
...
Seilassist/Sailassist/ServerSession/SessionShipStatus.swift
View file @
71f416a7
...
...
@@ -20,7 +20,6 @@ class SessionShipStatus : ObservableObject {
* 船情報
*/
func
RequestShipStatus
(
_
completion
:
@escaping
((
Result
<
Data
,
APIError
>
))
->
Void
)
{
print
(
debug
:
"calld"
)
if
Calling
{
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