Skip to content

Commit

Permalink
1.9.4 (413)
Browse files Browse the repository at this point in the history
denis15yo committed Jan 10, 2025
1 parent 91fb3ca commit 0edbe9f
Showing 38 changed files with 258 additions and 740 deletions.
12 changes: 6 additions & 6 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions Nicegram/NGData/Sources/NGSettings.swift
Original file line number Diff line number Diff line change
@@ -185,17 +185,13 @@ public func checkPremium(completion: @escaping (Bool) -> Void) {
}

public func isPremium() -> Bool {
#if DEBUG
return true
#else
if #available(iOS 13.0, *) {
return PremiumContainer.shared
.getPremiumStatusUseCase()
.hasPremiumOnDevice()
} else {
return false
}
#endif
}

public func usetrButton() -> [(Bool, [String])] {
38 changes: 0 additions & 38 deletions Nicegram/NGLab/Sources/RegDate.swift
Original file line number Diff line number Diff line change
@@ -142,44 +142,6 @@ public func makeNiceRegDateStr(_ date: String) -> String {
}
}

public func getDaysFromRegDate(with id: Int64) -> Signal<Int?, NoError> {
if let dateString = getCachedRegDate(id) {
return .single(days(from: dateString))
} else {
return getRegDate(id)
.skipError()
|> map { dateString in
days(from: dateString)
}
}
}

private func days(from dateString: String, to: Date = Date()) -> Int? {
let monthDateFormatter = DateFormatter()
monthDateFormatter.dateFormat = "yyyy-MM"

let dayDateFormatter = DateFormatter()
dayDateFormatter.dateFormat = "yyyy-MM-dd"

var convertDateFormatter = DateFormatter()

var date: Date?
if let monthDate = monthDateFormatter.date(from: dateString) {
date = monthDate
} else if let dayDate = dayDateFormatter.date(from: dateString) {
date = dayDate
}

if let date {
let calendar = Calendar.current
let components = calendar.dateComponents([.day], from: date, to: to)
if let days = components.day {
return days
}
}

return nil
}

public func resetRegDateCache() -> Void {
UserDefaults.standard.removePersistentDomain(forName: "CachedRegDate")
19 changes: 0 additions & 19 deletions Nicegram/NGPersonality/BUILD

This file was deleted.

35 changes: 0 additions & 35 deletions Nicegram/NGPersonality/Sources/CollectGhostScore.swift

This file was deleted.

115 changes: 0 additions & 115 deletions Nicegram/NGPersonality/Sources/CollectInfluencerScore.swift

This file was deleted.

106 changes: 0 additions & 106 deletions Nicegram/NGPersonality/Sources/CollectMessagesActivity.swift

This file was deleted.

16 changes: 0 additions & 16 deletions Nicegram/NGPersonalityCore/BUILD

This file was deleted.

Loading

0 comments on commit 0edbe9f

Please sign in to comment.