make virtual scrolling optional in case people want to be able to ctrl-f all page
This commit is contained in:
parent
42f8fb2dca
commit
c49b8e2089
7 changed files with 16 additions and 4 deletions
|
@ -92,6 +92,11 @@
|
||||||
{{ $t('settings.reply_link_preview') }}
|
{{ $t('settings.reply_link_preview') }}
|
||||||
</Checkbox>
|
</Checkbox>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<Checkbox v-model="virtualScrolling">
|
||||||
|
{{ $t('settings.virtual_scrolling') }}
|
||||||
|
</Checkbox>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -70,11 +70,14 @@ const Timeline = {
|
||||||
pinnedStatusIdsObject () {
|
pinnedStatusIdsObject () {
|
||||||
return keyBy(this.pinnedStatusIds)
|
return keyBy(this.pinnedStatusIds)
|
||||||
},
|
},
|
||||||
displayingStatuses () {
|
statusesToDisplay () {
|
||||||
const amount = this.timeline.visibleStatuses.length
|
const amount = this.timeline.visibleStatuses.length
|
||||||
const min = Math.max(0, this.vScrollIndex - 20)
|
const min = Math.max(0, this.vScrollIndex - 20)
|
||||||
const max = Math.min(amount, this.vScrollIndex + 20)
|
const max = Math.min(amount, this.vScrollIndex + 20)
|
||||||
return this.timeline.visibleStatuses.slice(min, max).map(_ => _.id)
|
return this.timeline.visibleStatuses.slice(min, max).map(_ => _.id)
|
||||||
|
},
|
||||||
|
virtualScrollingEnabled () {
|
||||||
|
return this.$store.getters.mergedConfig.virtualScrolling
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
:collapsable="true"
|
:collapsable="true"
|
||||||
:in-profile="inProfile"
|
:in-profile="inProfile"
|
||||||
:profile-user-id="userId"
|
:profile-user-id="userId"
|
||||||
:virtualHidden="!displayingStatuses.includes(status.id)"
|
:virtualHidden="virtualScrollingEnabled && !statusesToDisplay.includes(status.id)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -375,6 +375,7 @@
|
||||||
"false": "no",
|
"false": "no",
|
||||||
"true": "yes"
|
"true": "yes"
|
||||||
},
|
},
|
||||||
|
"virtual_scrolling": "Optimize timeline rendering",
|
||||||
"fun": "Fun",
|
"fun": "Fun",
|
||||||
"greentext": "Meme arrows",
|
"greentext": "Meme arrows",
|
||||||
"notifications": "Notifications",
|
"notifications": "Notifications",
|
||||||
|
|
|
@ -228,7 +228,8 @@
|
||||||
"values": {
|
"values": {
|
||||||
"false": "pois päältä",
|
"false": "pois päältä",
|
||||||
"true": "päällä"
|
"true": "päällä"
|
||||||
}
|
},
|
||||||
|
"virtual_scrolling": "Optimoi aikajanan suorituskykyä"
|
||||||
},
|
},
|
||||||
"time": {
|
"time": {
|
||||||
"day": "{0} päivä",
|
"day": "{0} päivä",
|
||||||
|
|
|
@ -49,7 +49,8 @@ export const defaultState = {
|
||||||
useContainFit: false,
|
useContainFit: false,
|
||||||
greentext: undefined, // instance default
|
greentext: undefined, // instance default
|
||||||
hidePostStats: undefined, // instance default
|
hidePostStats: undefined, // instance default
|
||||||
hideUserStats: undefined // instance default
|
hideUserStats: undefined, // instance default
|
||||||
|
virtualScrolling: undefined // instance default
|
||||||
}
|
}
|
||||||
|
|
||||||
// caching the instance default properties
|
// caching the instance default properties
|
||||||
|
|
|
@ -34,6 +34,7 @@ const defaultState = {
|
||||||
showFeaturesPanel: true,
|
showFeaturesPanel: true,
|
||||||
minimalScopesMode: false,
|
minimalScopesMode: false,
|
||||||
greentext: false,
|
greentext: false,
|
||||||
|
virtualScrolling: true,
|
||||||
|
|
||||||
// Nasty stuff
|
// Nasty stuff
|
||||||
pleromaBackend: true,
|
pleromaBackend: true,
|
||||||
|
|
Loading…
Reference in a new issue