mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Version 11.9
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import Foundation
|
||||
import Postbox
|
||||
import SGSimpleSettings
|
||||
|
||||
public let anonymousSavedMessagesId: Int64 = 2666000
|
||||
|
||||
@@ -28,6 +29,13 @@ public extension Peer {
|
||||
break
|
||||
}
|
||||
|
||||
// MARK: Swiftgram
|
||||
let chatId = self.id.id._internalGetInt64Value()
|
||||
if contentSettings.appConfiguration.sgWebSettings.global.forceReasons.contains(chatId) {
|
||||
return "Unavailable in Swiftgram due to App Store Guidelines"
|
||||
} else if contentSettings.appConfiguration.sgWebSettings.global.unforceReasons.contains(chatId) {
|
||||
return nil
|
||||
}
|
||||
if let restrictionInfo = restrictionInfo {
|
||||
for rule in restrictionInfo.rules {
|
||||
if rule.reason == "sensitive" {
|
||||
@@ -35,7 +43,7 @@ public extension Peer {
|
||||
}
|
||||
if rule.platform == "all" || rule.platform == platform || contentSettings.addContentRestrictionReasons.contains(rule.platform) {
|
||||
if !contentSettings.ignoreContentRestrictionReasons.contains(rule.reason) {
|
||||
return rule.text
|
||||
return rule.text + "\n" + "\(rule.reason)-\(rule.platform)"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -249,8 +257,11 @@ public extension Peer {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Swiftgram
|
||||
var nameColor: PeerNameColor? {
|
||||
if SGSimpleSettings.shared.accountColorsSaturation == 0 {
|
||||
return nil
|
||||
}
|
||||
switch self {
|
||||
case let user as TelegramUser:
|
||||
if let nameColor = user.nameColor {
|
||||
|
||||
Reference in New Issue
Block a user