@@ -186,6 +193,7 @@ export default Vue.extend({
version,
latestVersion: undefined,
checkingForUpdate: false,
+ fetchOnScroll: true,
autoWatch: true,
enableSounds: localStorage.getItem('enableSounds') == 'true',
lang: localStorage.getItem('lang') || '',
@@ -223,6 +231,16 @@ export default Vue.extend({
if ((this as any).os.i.settings.auto_watch != null) {
this.autoWatch = (this as any).os.i.settings.auto_watch;
+ this.$watch('os.i.settings.auto_watch', v => {
+ this.autoWatch = v;
+ });
+ }
+
+ if ((this as any).os.i.client_settings.fetchOnScroll != null) {
+ this.fetchOnScroll = (this as any).os.i.client_settings.fetchOnScroll;
+ this.$watch('os.i.client_settings.fetchOnScroll', v => {
+ this.fetchOnScroll = v;
+ });
}
},
methods: {
@@ -230,6 +248,12 @@ export default Vue.extend({
this.$router.push('/i/customize-home');
this.$emit('done');
},
+ onChangeFetchOnScroll(v) {
+ (this as any).api('i/update_client_setting', {
+ name: 'fetchOnScroll',
+ value: v
+ });
+ },
onChangeAutoWatch(v) {
(this as any).api('i/update', {
auto_watch: v
diff --git a/src/web/app/desktop/views/components/timeline.vue b/src/web/app/desktop/views/components/timeline.vue
index c35baa159e..99889c3cc2 100644
--- a/src/web/app/desktop/views/components/timeline.vue
+++ b/src/web/app/desktop/views/components/timeline.vue
@@ -8,10 +8,10 @@
%fa:R comments%自分の投稿や、自分がフォローしているユーザーの投稿が表示されます。
-
- %fa:comments%
+
+
@@ -105,8 +105,10 @@ export default Vue.extend({
this.fetch();
},
onScroll() {
- const current = window.scrollY + window.innerHeight;
- if (current > document.body.offsetHeight - 8) this.more();
+ if ((this as any).os.i.client_settings.fetchOnScroll !== false) {
+ const current = window.scrollY + window.innerHeight;
+ if (current > document.body.offsetHeight - 8) this.more();
+ }
},
onKeydown(e) {
if (e.target.tagName != 'INPUT' && e.target.tagName != 'TEXTAREA') {