File tree Expand file tree Collapse file tree 2 files changed +24
-4
lines changed
Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 1515 <dependencies >
1616 <nextcloud min-version =" 28" max-version =" 28" />
1717 </dependencies >
18- <default_enable />
1918</info >
Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ export default {
230230
231231 filters: {
232232 uniqueKey (file ) {
233- return file .fileid || file .source
233+ return ' ' + file .fileid + file .source
234234 },
235235 },
236236
@@ -402,6 +402,27 @@ export default {
402402 ' viewer--split' : this .comparisonFile ,
403403 }
404404 },
405+
406+ isSameFile () {
407+ return (fileInfo = null , path = null ) => {
408+ if (
409+ path && path === this .currentFile .path
410+ && ! this .currentFile .source
411+ ) {
412+ return true
413+ }
414+
415+ if (
416+ fileInfo && fileInfo .fileid === this .currentFile .fileid
417+ && fileInfo .mtime && fileInfo .mtime === this .currentFile .mtime
418+ && fileInfo .source && fileInfo .source === this .currentFile .source
419+ ) {
420+ return true
421+ }
422+
423+ return false
424+ }
425+ },
405426 },
406427
407428 watch: {
@@ -563,7 +584,7 @@ export default {
563584 this .cancelRequestFile ()
564585
565586 // do not open the same file again
566- if (path === this .currentFile . path && ! this . currentFile . source ) {
587+ if (this .isSameFile ( null , path) ) {
567588 return
568589 }
569590
@@ -614,7 +635,7 @@ export default {
614635 this .cancelRequestFolder ()
615636
616637 // do not open the same file info again
617- if (fileInfo . basename === this .currentFile . basename && fileInfo . source !== this . currentFile . source ) {
638+ if (this .isSameFile ( fileInfo) ) {
618639 return
619640 }
620641
You can’t perform that action at this time.
0 commit comments