Skip to content

Commit

Permalink
1.9.5 (426)
Browse files Browse the repository at this point in the history
  • Loading branch information
denis15yo committed Jan 21, 2025
1 parent 8b059ce commit 6791b44
Show file tree
Hide file tree
Showing 57 changed files with 597 additions and 679 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
Expand Up @@ -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])] {
Expand Down
38 changes: 0 additions & 38 deletions Nicegram/NGLab/Sources/RegDate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
22 changes: 0 additions & 22 deletions Nicegram/NGPersonality/BUILD

This file was deleted.

32 changes: 0 additions & 32 deletions Nicegram/NGPersonality/Sources/CollectActiveHours.swift

This file was deleted.

17 changes: 0 additions & 17 deletions Nicegram/NGPersonality/Sources/CollectContactsActivity.swift

This file was deleted.

15 changes: 0 additions & 15 deletions Nicegram/NGPersonality/Sources/CollectDailyActivity.swift

This file was deleted.

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

This file was deleted.

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

This file was deleted.

Loading

0 comments on commit 6791b44

Please sign in to comment.