mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Dust demo
This commit is contained in:
parent
ceead276c4
commit
86d983924b
@ -2886,17 +2886,19 @@ public final class ChatHistoryListNodeImpl: ListView, ChatHistoryNode, ChatHisto
|
|||||||
let transition = self.enqueuedHistoryViewTransitions.removeFirst()
|
let transition = self.enqueuedHistoryViewTransitions.removeFirst()
|
||||||
|
|
||||||
var expiredMessageIds = Set<MessageId>()
|
var expiredMessageIds = Set<MessageId>()
|
||||||
if let previousHistoryView = self.historyView {
|
if let previousHistoryView = self.historyView, transition.options.contains(.AnimateInsertion) {
|
||||||
|
let demoDustEffect = self.context.sharedContext.immediateExperimentalUISettings.dustEffect
|
||||||
|
|
||||||
var existingIds = Set<MessageId>()
|
var existingIds = Set<MessageId>()
|
||||||
for entry in transition.historyView.filteredEntries {
|
for entry in transition.historyView.filteredEntries {
|
||||||
switch entry {
|
switch entry {
|
||||||
case let .MessageEntry(message, _, _, _, _, _):
|
case let .MessageEntry(message, _, _, _, _, _):
|
||||||
if message.autoremoveAttribute != nil {
|
if message.autoremoveAttribute != nil || demoDustEffect {
|
||||||
existingIds.insert(message.id)
|
existingIds.insert(message.id)
|
||||||
}
|
}
|
||||||
case let .MessageGroupEntry(_, messages, _):
|
case let .MessageGroupEntry(_, messages, _):
|
||||||
for message in messages {
|
for message in messages {
|
||||||
if message.0.autoremoveAttribute != nil {
|
if message.0.autoremoveAttribute != nil || demoDustEffect {
|
||||||
existingIds.insert(message.0.id)
|
existingIds.insert(message.0.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2914,6 +2916,8 @@ public final class ChatHistoryListNodeImpl: ListView, ChatHistoryNode, ChatHisto
|
|||||||
if exipiresAt >= currentTimestamp - 1 {
|
if exipiresAt >= currentTimestamp - 1 {
|
||||||
expiredMessageIds.insert(message.id)
|
expiredMessageIds.insert(message.id)
|
||||||
}
|
}
|
||||||
|
} else if demoDustEffect {
|
||||||
|
expiredMessageIds.insert(message.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case let .MessageGroupEntry(_, messages, _):
|
case let .MessageGroupEntry(_, messages, _):
|
||||||
@ -2923,6 +2927,8 @@ public final class ChatHistoryListNodeImpl: ListView, ChatHistoryNode, ChatHisto
|
|||||||
let exipiresAt = countdownBeginTime + autoremoveAttribute.timeout
|
let exipiresAt = countdownBeginTime + autoremoveAttribute.timeout
|
||||||
if exipiresAt >= currentTimestamp - 1 {
|
if exipiresAt >= currentTimestamp - 1 {
|
||||||
expiredMessageIds.insert(message.0.id)
|
expiredMessageIds.insert(message.0.id)
|
||||||
|
} else if demoDustEffect {
|
||||||
|
expiredMessageIds.insert(message.0.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -195,7 +195,7 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
|||||||
self.storiesJpegExperiment = try container.decodeIfPresent(Bool.self, forKey: "storiesJpegExperiment") ?? false
|
self.storiesJpegExperiment = try container.decodeIfPresent(Bool.self, forKey: "storiesJpegExperiment") ?? false
|
||||||
self.crashOnMemoryPressure = try container.decodeIfPresent(Bool.self, forKey: "crashOnMemoryPressure") ?? false
|
self.crashOnMemoryPressure = try container.decodeIfPresent(Bool.self, forKey: "crashOnMemoryPressure") ?? false
|
||||||
self.unidirectionalSwipeToReply = try container.decodeIfPresent(Bool.self, forKey: "unidirectionalSwipeToReply") ?? false
|
self.unidirectionalSwipeToReply = try container.decodeIfPresent(Bool.self, forKey: "unidirectionalSwipeToReply") ?? false
|
||||||
self.dustEffect = try container.decodeIfPresent(Bool.self, forKey: "dustEffect") ?? false
|
self.dustEffect = try container.decodeIfPresent(Bool.self, forKey: "dustEffect_2") ?? false
|
||||||
self.callUIV2 = try container.decodeIfPresent(Bool.self, forKey: "callUIV2") ?? false
|
self.callUIV2 = try container.decodeIfPresent(Bool.self, forKey: "callUIV2") ?? false
|
||||||
self.allowWebViewInspection = try container.decodeIfPresent(Bool.self, forKey: "allowWebViewInspection") ?? false
|
self.allowWebViewInspection = try container.decodeIfPresent(Bool.self, forKey: "allowWebViewInspection") ?? false
|
||||||
}
|
}
|
||||||
@ -232,7 +232,7 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
|||||||
try container.encode(self.storiesJpegExperiment, forKey: "storiesJpegExperiment")
|
try container.encode(self.storiesJpegExperiment, forKey: "storiesJpegExperiment")
|
||||||
try container.encode(self.crashOnMemoryPressure, forKey: "crashOnMemoryPressure")
|
try container.encode(self.crashOnMemoryPressure, forKey: "crashOnMemoryPressure")
|
||||||
try container.encode(self.unidirectionalSwipeToReply, forKey: "unidirectionalSwipeToReply")
|
try container.encode(self.unidirectionalSwipeToReply, forKey: "unidirectionalSwipeToReply")
|
||||||
try container.encode(self.dustEffect, forKey: "dustEffect")
|
try container.encode(self.dustEffect, forKey: "dustEffect_2")
|
||||||
try container.encode(self.callUIV2, forKey: "callUIV2")
|
try container.encode(self.callUIV2, forKey: "callUIV2")
|
||||||
try container.encode(self.allowWebViewInspection, forKey: "allowWebViewInspection")
|
try container.encode(self.allowWebViewInspection, forKey: "allowWebViewInspection")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user