Notifly 설정 추가

This commit is contained in:
Yu Sung
2025-03-12 16:05:08 +09:00
parent f9bad015a8
commit f22bc9d98d
10 changed files with 128 additions and 1 deletions

View File

@@ -74,6 +74,27 @@ final class HomeViewModel: ObservableObject {
if data.followingChannelLiveNotice == nil && data.followingChannelUploadContentNotice == nil && data.messageNotice == nil {
AppState.shared.isShowNotificationSettingsDialog = true
}
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
let currentDate = Date()
let lastActiveDate = dateFormatter.string(from: currentDate)
var params = [
"nickname": UserDefaults.string(forKey: .nickname),
"last_active_date": lastActiveDate,
"charge_count": data.chargeCount,
"signup_date": data.signupDate,
"is_auth": data.isAuth,
"can": data.can
]
if data.isAuth {
params["gender"] = data.gender
}
NotiflyClient.shared.setUser(userId: UserDefaults.int(forKey: .userId), params: params)
}
} catch {
print(error)