File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -99,14 +99,22 @@ export default {
9999 this .$requests .loadPrevious (10 ).then (() => {
100100 this .loadingMoreRequests = false
101101 })
102+ },
103+ shouldShowFirstRequest () {
104+ return ! this .$store .get (' preserveLog' )
105+ && (! this .$request || ! this .$requests .findId (this .$request .id ))
106+ },
107+ shouldShowIncomingRequest () {
108+ return this .$store .get (' preserveLog' )
109+ && (! this .$request || this .global .showIncomingRequests )
102110 }
103111 },
104112 watch: {
105113 requests: {
106114 handler (items ) {
107- if (! this .$store . get ( ' preserveLog ' )) {
115+ if (this .shouldShowFirstRequest ( )) {
108116 this .showRequest (this .global .$requests .first ())
109- } else if (this .global . showIncomingRequests ) {
117+ } else if (this .shouldShowIncomingRequest () ) {
110118 this .showRequest (this .global .$requests .last ())
111119 this .$refs .requestsContainer .scrollTop = this .$refs .requestsTable .offsetHeight
112120 }
You can’t perform that action at this time.
0 commit comments