mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Event Permalink Tweaks (#2754)
* Handle errors focussing the timeline. * Add a test for focussing on an existing timeline item.
This commit is contained in:
@@ -234,9 +234,14 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
||||
switch await timelineController.focusOnEvent(eventID, timelineSize: Constants.detachedTimelineSize) {
|
||||
case .success:
|
||||
state.timelineViewState.focussedEventID = eventID
|
||||
case .failure:
|
||||
case .failure(let error):
|
||||
MXLog.error("Failed to focus on event \(eventID)")
|
||||
displayError(.toast(L10n.commonFailed))
|
||||
|
||||
if case .eventNotFound = error {
|
||||
displayError(.toast(L10n.errorMessageNotFound))
|
||||
} else {
|
||||
displayError(.toast(L10n.commonFailed))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user