mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 20:09:04 +00:00
Fixes #2147 - Scroll the timeline to the bottom when sending message as well as media, polls and locations.
This commit is contained in:
committed by
Stefan Ceriu
parent
6905ac5f70
commit
8189b0a471
@@ -42,9 +42,9 @@ class RoomProxy: RoomProxyProtocol {
|
||||
membersSubject.asCurrentValuePublisher()
|
||||
}
|
||||
|
||||
private let stateUpdatesSubject = PassthroughSubject<Void, Never>()
|
||||
var stateUpdatesPublisher: AnyPublisher<Void, Never> {
|
||||
stateUpdatesSubject.eraseToAnyPublisher()
|
||||
private let actionsSubject = PassthroughSubject<RoomProxyAction, Never>()
|
||||
var actions: AnyPublisher<RoomProxyAction, Never> {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
var ownUserID: String {
|
||||
@@ -407,7 +407,7 @@ class RoomProxy: RoomProxyProtocol {
|
||||
private func subscribeToRoomStateUpdates() {
|
||||
roomInfoObservationToken = room.subscribeToRoomInfoUpdates(listener: RoomInfoUpdateListener { [weak self] in
|
||||
MXLog.info("Received room info update")
|
||||
self?.stateUpdatesSubject.send(())
|
||||
self?.actionsSubject.send(.stateUpdate)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,10 @@ enum RoomProxyError: Error, Equatable {
|
||||
case failedCheckingPermission
|
||||
}
|
||||
|
||||
enum RoomProxyAction {
|
||||
case stateUpdate
|
||||
}
|
||||
|
||||
// sourcery: AutoMockable
|
||||
protocol RoomProxyProtocol {
|
||||
var id: String { get }
|
||||
@@ -65,9 +69,7 @@ protocol RoomProxyProtocol {
|
||||
|
||||
var activeMembersCount: Int { get }
|
||||
|
||||
/// Publishes room state updates
|
||||
/// The thread on which this publisher sends the output isn't defined.
|
||||
var stateUpdatesPublisher: AnyPublisher<Void, Never> { get }
|
||||
var actions: AnyPublisher<RoomProxyAction, Never> { get }
|
||||
|
||||
var timeline: TimelineProxyProtocol { get }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user