mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-08 08:31:13 +00:00
ChatListController: fix archive strings
ChatListItem: fix text node animations
This commit is contained in:
parent
f5b8543496
commit
1b7f876c3f
@ -798,11 +798,10 @@ public class ChatListController: TelegramController, KeyShortcutResponder, UIVie
|
|||||||
}
|
}
|
||||||
|
|
||||||
self.chatListDisplayNode.dismissSelf = { [weak self] in
|
self.chatListDisplayNode.dismissSelf = { [weak self] in
|
||||||
if let navigationController = self?.navigationController as? NavigationController {
|
guard let strongSelf = self, let navigationController = strongSelf.navigationController as? NavigationController else {
|
||||||
if navigationController.viewControllers.count > 1 {
|
return
|
||||||
let _ = navigationController.popViewController(animated: true)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
navigationController.filterController(strongSelf, animated: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
self.chatListDisplayNode.chatListNode.contentOffsetChanged = { [weak self] offset in
|
self.chatListDisplayNode.chatListNode.contentOffsetChanged = { [weak self] offset in
|
||||||
@ -1526,17 +1525,16 @@ public class ChatListController: TelegramController, KeyShortcutResponder, UIVie
|
|||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
|
|
||||||
let title: String
|
var title = peerIds.count == 1 ? strongSelf.presentationData.strings.ChatList_UndoArchiveTitle : strongSelf.presentationData.strings.ChatList_UndoArchiveMultipleTitle
|
||||||
let text: String
|
let text: String
|
||||||
let undo: Bool
|
let undo: Bool
|
||||||
switch previousHintCount {
|
switch previousHintCount {
|
||||||
case 0:
|
case 0:
|
||||||
title = strongSelf.presentationData.strings.ChatList_UndoArchiveTitle
|
|
||||||
text = strongSelf.presentationData.strings.ChatList_UndoArchiveText1
|
text = strongSelf.presentationData.strings.ChatList_UndoArchiveText1
|
||||||
undo = false
|
undo = false
|
||||||
default:
|
default:
|
||||||
|
text = title
|
||||||
title = ""
|
title = ""
|
||||||
text = strongSelf.presentationData.strings.ChatList_UndoArchiveTitle
|
|
||||||
undo = true
|
undo = true
|
||||||
}
|
}
|
||||||
strongSelf.present(UndoOverlayController(context: strongSelf.context, content: .archivedChat(peerId: peerIds[0], title: title, text: text, undo: undo), elevatedLayout: false, animateInAsReplacement: true, action: action), in: .current)
|
strongSelf.present(UndoOverlayController(context: strongSelf.context, content: .archivedChat(peerId: peerIds[0], title: title, text: text, undo: undo), elevatedLayout: false, animateInAsReplacement: true, action: action), in: .current)
|
||||||
|
@ -1523,8 +1523,10 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
|
|||||||
transition.updateFrame(node: self.inputActivitiesNode, frame: CGRect(origin: CGPoint(x: contentRect.origin.x, y: self.inputActivitiesNode.frame.minY), size: self.inputActivitiesNode.bounds.size))
|
transition.updateFrame(node: self.inputActivitiesNode, frame: CGRect(origin: CGPoint(x: contentRect.origin.x, y: self.inputActivitiesNode.frame.minY), size: self.inputActivitiesNode.bounds.size))
|
||||||
|
|
||||||
var textFrame = self.textNode.frame
|
var textFrame = self.textNode.frame
|
||||||
|
let textDeltaX = textFrame.origin.x - contentRect.origin.x
|
||||||
|
transition.animatePositionAdditive(node: self.textNode, offset: CGPoint(x: textDeltaX, y: 0.0))
|
||||||
textFrame.origin.x = contentRect.origin.x
|
textFrame.origin.x = contentRect.origin.x
|
||||||
transition.updateFrame(node: self.textNode, frame: CGRect(origin: textFrame.origin, size: textFrame.size))
|
self.textNode.frame = textFrame
|
||||||
|
|
||||||
var contentImageFrame = self.contentImageNode.frame
|
var contentImageFrame = self.contentImageNode.frame
|
||||||
contentImageFrame.origin = textFrame.origin.offsetBy(dx: 1.0, dy: 0.0)
|
contentImageFrame.origin = textFrame.origin.offsetBy(dx: 1.0, dy: 0.0)
|
||||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user