mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +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
@@ -1939,11 +1939,11 @@ class RoomProxyMock: RoomProxyProtocol {
|
||||
set(value) { underlyingActiveMembersCount = value }
|
||||
}
|
||||
var underlyingActiveMembersCount: Int!
|
||||
var stateUpdatesPublisher: AnyPublisher<Void, Never> {
|
||||
get { return underlyingStateUpdatesPublisher }
|
||||
set(value) { underlyingStateUpdatesPublisher = value }
|
||||
var actions: AnyPublisher<RoomProxyAction, Never> {
|
||||
get { return underlyingActions }
|
||||
set(value) { underlyingActions = value }
|
||||
}
|
||||
var underlyingStateUpdatesPublisher: AnyPublisher<Void, Never>!
|
||||
var underlyingActions: AnyPublisher<RoomProxyAction, Never>!
|
||||
var timeline: TimelineProxyProtocol {
|
||||
get { return underlyingTimeline }
|
||||
set(value) { underlyingTimeline = value }
|
||||
@@ -2578,6 +2578,11 @@ class SessionVerificationControllerProxyMock: SessionVerificationControllerProxy
|
||||
}
|
||||
}
|
||||
class TimelineProxyMock: TimelineProxyProtocol {
|
||||
var actions: AnyPublisher<TimelineProxyAction, Never> {
|
||||
get { return underlyingActions }
|
||||
set(value) { underlyingActions = value }
|
||||
}
|
||||
var underlyingActions: AnyPublisher<TimelineProxyAction, Never>!
|
||||
var timelineProvider: RoomTimelineProviderProtocol {
|
||||
get { return underlyingTimelineProvider }
|
||||
set(value) { underlyingTimelineProvider = value }
|
||||
|
||||
@@ -32,12 +32,19 @@ struct RoomProxyMockConfiguration {
|
||||
var canonicalAlias: String?
|
||||
var alternativeAliases: [String] = []
|
||||
var hasUnreadNotifications = Bool.random()
|
||||
var canUserTriggerRoomNotification = false
|
||||
|
||||
var timeline = {
|
||||
let mock = TimelineProxyMock()
|
||||
mock.underlyingActions = Empty(completeImmediately: false).eraseToAnyPublisher()
|
||||
return mock
|
||||
}()
|
||||
|
||||
var members: [RoomMemberProxyProtocol]?
|
||||
var inviter: RoomMemberProxyMock?
|
||||
var memberForID: RoomMemberProxyMock = .mockMe
|
||||
var ownUserID = "@alice:somewhere.org"
|
||||
var canUserTriggerRoomNotification = false
|
||||
|
||||
|
||||
var invitedMembersCount = 100
|
||||
var joinedMembersCount = 50
|
||||
var activeMembersCount = 25
|
||||
@@ -62,6 +69,8 @@ extension RoomProxyMock {
|
||||
alternativeAliases = configuration.alternativeAliases
|
||||
hasUnreadNotifications = configuration.hasUnreadNotifications
|
||||
|
||||
timeline = configuration.timeline
|
||||
|
||||
invitedMembersCount = configuration.invitedMembersCount
|
||||
joinedMembersCount = configuration.joinedMembersCount
|
||||
activeMembersCount = configuration.activeMembersCount
|
||||
@@ -79,7 +88,7 @@ extension RoomProxyMock {
|
||||
|
||||
updateMembersClosure = { }
|
||||
acceptInvitationClosure = { .success(()) }
|
||||
underlyingStateUpdatesPublisher = Empty(completeImmediately: false).eraseToAnyPublisher()
|
||||
underlyingActions = Empty(completeImmediately: false).eraseToAnyPublisher()
|
||||
setNameClosure = { _ in .success(()) }
|
||||
setTopicClosure = { _ in .success(()) }
|
||||
getMemberUserIDReturnValue = .success(configuration.memberForID)
|
||||
|
||||
Reference in New Issue
Block a user