mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various improvements
This commit is contained in:
@@ -18,6 +18,7 @@ public struct UserLimitsConfiguration: Equatable {
|
||||
public let maxSharedFolderInviteLinks: Int32
|
||||
public let maxSharedFolderJoin: Int32
|
||||
public let maxStoryCaptionLength: Int32
|
||||
public let maxExpiringStoriesCount: Int32
|
||||
|
||||
public static var defaultValue: UserLimitsConfiguration {
|
||||
return UserLimitsConfiguration(
|
||||
@@ -36,7 +37,8 @@ public struct UserLimitsConfiguration: Equatable {
|
||||
maxReactionsPerMessage: 1,
|
||||
maxSharedFolderInviteLinks: 3,
|
||||
maxSharedFolderJoin: 2,
|
||||
maxStoryCaptionLength: 1024
|
||||
maxStoryCaptionLength: 1024,
|
||||
maxExpiringStoriesCount: 100
|
||||
)
|
||||
}
|
||||
|
||||
@@ -56,7 +58,8 @@ public struct UserLimitsConfiguration: Equatable {
|
||||
maxReactionsPerMessage: Int32,
|
||||
maxSharedFolderInviteLinks: Int32,
|
||||
maxSharedFolderJoin: Int32,
|
||||
maxStoryCaptionLength: Int32
|
||||
maxStoryCaptionLength: Int32,
|
||||
maxExpiringStoriesCount: Int32
|
||||
) {
|
||||
self.maxPinnedChatCount = maxPinnedChatCount
|
||||
self.maxArchivedPinnedChatCount = maxArchivedPinnedChatCount
|
||||
@@ -74,6 +77,7 @@ public struct UserLimitsConfiguration: Equatable {
|
||||
self.maxSharedFolderInviteLinks = maxSharedFolderInviteLinks
|
||||
self.maxSharedFolderJoin = maxSharedFolderJoin
|
||||
self.maxStoryCaptionLength = maxStoryCaptionLength
|
||||
self.maxExpiringStoriesCount = maxExpiringStoriesCount
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,5 +118,6 @@ extension UserLimitsConfiguration {
|
||||
self.maxSharedFolderInviteLinks = getValue("chatlist_invites_limit", orElse: isPremium ? 100 : 3)
|
||||
self.maxSharedFolderJoin = getValue("chatlists_joined_limit", orElse: isPremium ? 100 : 2)
|
||||
self.maxStoryCaptionLength = getGeneralValue("story_caption_length_limit", orElse: defaultValue.maxStoryCaptionLength)
|
||||
self.maxExpiringStoriesCount = getGeneralValue("story_expiring_limit", orElse: defaultValue.maxExpiringStoriesCount)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user