Various improvements

This commit is contained in:
Ilya Laktyushin
2020-11-04 21:12:12 +04:00
parent bc793ac286
commit f306171529
53 changed files with 5608 additions and 4579 deletions

View File

@@ -441,9 +441,9 @@ public class GalleryController: ViewController, StandalonePresentableController
namespaces = .not(Namespaces.Message.allScheduled)
}
return context.account.postbox.aroundMessageHistoryViewForLocation(context.chatLocationInput(for: chatLocation, contextHolder: chatLocationContextHolder), anchor: .index(message!.index), count: 50, clipHoles: false, fixedCombinedReadStates: nil, topTaggedMessageIdNamespaces: [], tagMask: tags, appendMessagesFromTheSameGroup: false, namespaces: namespaces, orderStatistics: [.combinedLocation])
|> mapToSignal { (view, _, _) -> Signal<GalleryMessageHistoryView?, NoError> in
let mapped = GalleryMessageHistoryView.view(view)
return .single(mapped)
|> mapToSignal { (view, _, _) -> Signal<GalleryMessageHistoryView?, NoError> in
let mapped = GalleryMessageHistoryView.view(view)
return .single(mapped)
}
} else {
return .single(GalleryMessageHistoryView.entries([MessageHistoryEntry(message: message!, isRead: false, location: nil, monthLocation: nil, attributes: MutableMessageHistoryEntryAttributes(authorIsContact: false))], false, false))
@@ -911,6 +911,11 @@ public class GalleryController: ViewController, StandalonePresentableController
if let strongSelf = self {
strongSelf.replaceRootController(controller, ready)
}
}, editMedia: { [weak self] messageId in
if let strongSelf = self {
strongSelf.dismiss(forceAway: true)
strongSelf.actionInteraction?.editMedia(messageId)
}
})
self.displayNode = GalleryControllerNode(controllerInteraction: controllerInteraction)
self.displayNodeDidLoad()