mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various fixes
This commit is contained in:
@@ -117,7 +117,7 @@ extension UserLimitsConfiguration {
|
||||
self.maxReactionsPerMessage = getValue("reactions_user_max", orElse: 1)
|
||||
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)
|
||||
self.maxStoryCaptionLength = getValue("story_caption_length_limit", orElse: defaultValue.maxStoryCaptionLength)
|
||||
self.maxExpiringStoriesCount = getValue("story_expiring_limit", orElse: defaultValue.maxExpiringStoriesCount)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3108,8 +3108,22 @@ final class StoryItemSetContainerSendMessage {
|
||||
case let .venue(_, venue):
|
||||
let subject = EngineMessage(stableId: 0, stableVersion: 0, id: EngineMessage.Id(peerId: PeerId(0), namespace: 0, id: 0), globallyUniqueId: nil, groupingKey: nil, groupInfo: nil, threadId: nil, timestamp: 0, flags: [], tags: [], globalTags: [], localTags: [], forwardInfo: nil, author: nil, text: "", attributes: [], media: [.geo(TelegramMediaMap(latitude: venue.latitude, longitude: venue.longitude, heading: nil, accuracyRadius: nil, geoPlace: nil, venue: venue.venue, liveBroadcastingTimeout: nil, liveProximityNotificationRadius: nil))], peers: [:], associatedMessages: [:], associatedMessageIds: [], associatedMedia: [:], associatedThreadInfo: nil, associatedStories: [:])
|
||||
|
||||
let context = component.context
|
||||
actions.append(ContextMenuAction(content: .textWithIcon(title: "View Location", icon: generateTintedImage(image: UIImage(bundleImageName: "Settings/TextArrowRight"), color: .white)), action: { [weak controller, weak view] in
|
||||
let locationController = LocationViewController(context: component.context, updatedPresentationData: updatedPresentationData, subject: subject, isStoryLocation: true, params: LocationViewParams(sendLiveLocation: { _ in }, stopLiveLocation: { _ in }, openUrl: { _ in }, openPeer: { _ in }))
|
||||
let locationController = LocationViewController(
|
||||
context: context,
|
||||
updatedPresentationData: updatedPresentationData,
|
||||
subject: subject,
|
||||
isStoryLocation: true,
|
||||
params: LocationViewParams(
|
||||
sendLiveLocation: { _ in },
|
||||
stopLiveLocation: { _ in },
|
||||
openUrl: { url in
|
||||
context.sharedContext.applicationBindings.openUrl(url)
|
||||
},
|
||||
openPeer: { _ in }
|
||||
)
|
||||
)
|
||||
view?.updateModalTransitionFactor(1.0, transition: .animated(duration: 0.5, curve: .spring))
|
||||
locationController.dismissed = { [weak view] in
|
||||
view?.updateModalTransitionFactor(0.0, transition: .animated(duration: 0.5, curve: .spring))
|
||||
|
||||
@@ -379,13 +379,9 @@ public final class AccountContextImpl: AccountContext {
|
||||
strongSelf.animatedEmojiStickersValue.set(.single(stickers))
|
||||
})
|
||||
|
||||
self.userLimitsConfigurationDisposable = (self.account.postbox.peerView(id: self.account.peerId)
|
||||
|> mapToSignal { peerView -> Signal<EngineConfiguration.UserLimits, NoError> in
|
||||
if let peer = peerView.peers[peerView.peerId] {
|
||||
return self.engine.data.subscribe(TelegramEngine.EngineData.Item.Configuration.UserLimits(isPremium: peer.isPremium))
|
||||
} else {
|
||||
return .complete()
|
||||
}
|
||||
self.userLimitsConfigurationDisposable = (self.engine.data.subscribe(TelegramEngine.EngineData.Item.Peer.Peer(id: account.peerId))
|
||||
|> mapToSignal { peer -> Signal<EngineConfiguration.UserLimits, NoError> in
|
||||
return self.engine.data.subscribe(TelegramEngine.EngineData.Item.Configuration.UserLimits(isPremium: peer?.isPremium ?? false))
|
||||
}
|
||||
|> deliverOnMainQueue).start(next: { [weak self] value in
|
||||
guard let strongSelf = self else {
|
||||
|
||||
Reference in New Issue
Block a user