Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
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
mobile-group
galaxy-iOS
Commits
cecb0586
Commit
cecb0586
authored
Sep 10, 2024
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
从app头像进去app badge状态清零
parent
d8528e93
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
Applegate(JPush).swift
galaxy/galaxy/Applegate(JPush).swift
+11
-0
YHTabBarViewController.swift
galaxy/galaxy/Classes/Base/C/YHTabBarViewController.swift
+1
-7
YHButlerServiceManager.swift
...s/ButlerServiceManager(银河管家)/YHButlerServiceManager.swift
+2
-2
No files found.
galaxy/galaxy/Applegate(JPush).swift
View file @
cecb0586
...
@@ -83,6 +83,7 @@ extension AppDelegate: JPUSHRegisterDelegate {
...
@@ -83,6 +83,7 @@ extension AppDelegate: JPUSHRegisterDelegate {
// 请求消息页面通知权限通知
// 请求消息页面通知权限通知
NotificationCenter
.
default
.
post
(
name
:
YhConstant
.
YhNotification
.
didReqeustNotifyPermissionNotification
,
object
:
nil
)
NotificationCenter
.
default
.
post
(
name
:
YhConstant
.
YhNotification
.
didReqeustNotifyPermissionNotification
,
object
:
nil
)
}
}
clearAllUnreadBadge
()
YHOSSManager
.
share
.
getOSSID
()
YHOSSManager
.
share
.
getOSSID
()
}
}
...
@@ -162,4 +163,14 @@ extension AppDelegate {
...
@@ -162,4 +163,14 @@ extension AppDelegate {
}
}
}
}
}
}
private
func
clearAllUnreadBadge
()
{
DispatchQueue
.
main
.
async
{
if
#available(iOS 16.0, *)
{
UNUserNotificationCenter
.
current
()
.
setBadgeCount
(
0
)
}
else
{
UIApplication
.
shared
.
applicationIconBadgeNumber
=
0
}
}
}
}
}
galaxy/galaxy/Classes/Base/C/YHTabBarViewController.swift
View file @
cecb0586
...
@@ -109,13 +109,7 @@ extension YHTabBarViewController {
...
@@ -109,13 +109,7 @@ extension YHTabBarViewController {
}
}
}
}
}
}
@objc
func
clearAllUnreadBadge
()
{
DispatchQueue
.
main
.
async
{
UIApplication
.
shared
.
applicationIconBadgeNumber
=
0
}
}
func
reportDeviceInfo
()
{
func
reportDeviceInfo
()
{
if
!
YHLoginManager
.
shared
.
isLogin
()
{
if
!
YHLoginManager
.
shared
.
isLogin
()
{
return
return
...
...
galaxy/galaxy/Classes/Modules/ButlerServiceManager(银河管家)/YHButlerServiceManager.swift
View file @
cecb0586
...
@@ -103,7 +103,7 @@ extension YHButlerServiceManager {
...
@@ -103,7 +103,7 @@ extension YHButlerServiceManager {
/// 必须在初始化后调用
/// 必须在初始化后调用
func
getLastMessage
()
->
YHButlerServiceMessage
?
{
func
getLastMessage
()
->
YHButlerServiceMessage
?
{
guard
let
message
=
getSessionList
()
.
fir
st
else
{
guard
let
message
=
getSessionList
()
.
la
st
else
{
return
nil
return
nil
}
}
return
YHButlerServiceMessageHandler
.
handleSessionMessage
(
sessionMessage
:
message
)
return
YHButlerServiceMessageHandler
.
handleSessionMessage
(
sessionMessage
:
message
)
...
@@ -201,7 +201,7 @@ extension YHButlerServiceManager {
...
@@ -201,7 +201,7 @@ extension YHButlerServiceManager {
/// 获取所有会话的列表;非平台电商用户,只有一个会话项,平台电商用户,有多个会话项
/// 获取所有会话的列表;非平台电商用户,只有一个会话项,平台电商用户,有多个会话项
func
getSessionList
()
->
[
QYSessionInfo
]
{
func
getSessionList
()
->
[
QYSessionInfo
]
{
let
list
=
conversationManager
?
.
getSessionList
()
??
[]
let
list
=
conversationManager
?
.
getSessionList
()
??
[]
printLog
(
"$$$$getSessionList
\(
list
.
first
?
.
lastMessageText
??
""
)
\(
list
.
first
?
.
lastMessageType
.
rawValue
??
0
)
\(
list
.
fir
st
?
.
lastMessageTimeStamp
??
0
)
"
)
printLog
(
"$$$$getSessionList
\(
list
.
last
?
.
lastMessageText
??
""
)
\(
list
.
last
?
.
lastMessageType
.
rawValue
??
0
)
\(
list
.
la
st
?
.
lastMessageTimeStamp
??
0
)
"
)
return
list
return
list
}
}
...
...
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