Skip to content

Commit

Permalink
Remove unused method
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Feb 8, 2023
1 parent 9440f7e commit 7d05367
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/components/MessagesList/MessagesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -442,36 +442,6 @@ export default {
return moment.unix(message.timestamp)
},

scrollToFocussedMessage() {
let focussed = null
if (this.$route?.hash?.startsWith('#message_')) {
// scroll to message in URL anchor
focussed = this.focusMessage(this.$route.hash.slice(9), false)
}

if (!focussed && this.visualLastReadMessageId) {
// scroll to last read message if visible in the current pages
focussed = this.focusMessage(this.visualLastReadMessageId, false, false)
}

// TODO: in case the element is not in a page but does exist in the DB,
// we need to scroll up / down to the page where it would exist after
// loading said pages

if (!focussed) {
// if no anchor was present or the message to focus on did not exist,
// scroll to bottom
this.scrollToBottom()
}

// if no scrollbars, clear read marker directly as scrolling is not possible for the user to clear it
// also clear in case lastReadMessage is zero which is due to an older bug
if (this.visualLastReadMessageId === 0 || this.scroller.scrollHeight <= this.scroller.offsetHeight) {
// clear after a delay, unless scrolling can resume in-between
this.debounceUpdateReadMarkerPosition()
}
},

async handleStartGettingMessagesPreconditions() {
if (this.token && this.isParticipant && !this.isInLobby) {

Expand Down

0 comments on commit 7d05367

Please sign in to comment.