aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2020-09-29 10:18:37 +0000
committerShpuld Shpludson <shp@cock.li>2020-09-29 10:18:37 +0000
commit91778a02766602b81ec8737282495aa4b5294d19 (patch)
treeda6bb6092acfb50b441f3afb5c4cc792e0b2b3a4 /src/modules
parent3781e521e64a59c4e38902601555ae01f99d9fce (diff)
parentf174f289a93e6bef1182a2face00bb809da49d18 (diff)
Merge branch 'feat/custom-virtual-scrolling' into 'develop'
Timeline virtual scrolling See merge request pleroma/pleroma-fe!1043
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/config.js3
-rw-r--r--src/modules/instance.js1
-rw-r--r--src/modules/statuses.js6
3 files changed, 9 insertions, 1 deletions
diff --git a/src/modules/config.js b/src/modules/config.js
index 409d77a4..444b8ec7 100644
--- a/src/modules/config.js
+++ b/src/modules/config.js
@@ -65,7 +65,8 @@ export const defaultState = {
useContainFit: false,
greentext: undefined, // instance default
hidePostStats: undefined, // instance default
- hideUserStats: undefined // instance default
+ hideUserStats: undefined, // instance default
+ virtualScrolling: undefined // instance default
}
// caching the instance default properties
diff --git a/src/modules/instance.js b/src/modules/instance.js
index 3fe3bbf3..b3cbffc6 100644
--- a/src/modules/instance.js
+++ b/src/modules/instance.js
@@ -41,6 +41,7 @@ const defaultState = {
sidebarRight: false,
subjectLineBehavior: 'email',
theme: 'pleroma-dark',
+ virtualScrolling: true,
// Nasty stuff
customEmoji: [],
diff --git a/src/modules/statuses.js b/src/modules/statuses.js
index e108b2a7..155cc4b9 100644
--- a/src/modules/statuses.js
+++ b/src/modules/statuses.js
@@ -568,6 +568,9 @@ export const mutations = {
updateStatusWithPoll (state, { id, poll }) {
const status = state.allStatusesObject[id]
status.poll = poll
+ },
+ setVirtualHeight (state, { statusId, height }) {
+ state.allStatusesObject[statusId].virtualHeight = height
}
}
@@ -753,6 +756,9 @@ const statuses = {
store.commit('addNewStatuses', { statuses: data.statuses })
return data
})
+ },
+ setVirtualHeight ({ commit }, { statusId, height }) {
+ commit('setVirtualHeight', { statusId, height })
}
},
mutations