add option to prevent page from getting pushed when making a new post with streaming api enabled
This commit is contained in:
parent
872c110510
commit
526f7464d1
6 changed files with 23 additions and 0 deletions
|
|
@ -34,6 +34,7 @@
|
||||||
- script to get new emojis is included for future unicode versions
|
- script to get new emojis is included for future unicode versions
|
||||||
- add toggle for showing post edit notifications
|
- add toggle for showing post edit notifications
|
||||||
- add support for accepted follow request notifications
|
- add support for accepted follow request notifications
|
||||||
|
- add option to prevent page from getting pushed when making a new post with streaming api enabled (similar to 3rd "for unreads" option)
|
||||||
- add a script to download ruffle for flash support (requires python3 and requests library)
|
- add a script to download ruffle for flash support (requires python3 and requests library)
|
||||||
- download by entering `tools/` and running `python3 download_ruffle.py`
|
- download by entering `tools/` and running `python3 download_ruffle.py`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -436,6 +436,8 @@ const PostStatusForm = {
|
||||||
|
|
||||||
const postHandler = this.postHandler ? this.postHandler : statusPoster.postStatus
|
const postHandler = this.postHandler ? this.postHandler : statusPoster.postStatus
|
||||||
|
|
||||||
|
let bef = document.getElementsByClassName("Timeline")[0].scrollHeight
|
||||||
|
|
||||||
postHandler(postingOptions).then((data) => {
|
postHandler(postingOptions).then((data) => {
|
||||||
if (!data.error) {
|
if (!data.error) {
|
||||||
this.clearStatus()
|
this.clearStatus()
|
||||||
|
|
@ -444,6 +446,14 @@ const PostStatusForm = {
|
||||||
this.error = data.error
|
this.error = data.error
|
||||||
}
|
}
|
||||||
this.posting = false
|
this.posting = false
|
||||||
|
|
||||||
|
// same as timeline.js
|
||||||
|
if (this.$store.getters.mergedConfig.fixupScrollOnPostWStreaming && window.scrollY > 0) {
|
||||||
|
let after = document.getElementsByClassName("Timeline")[0].scrollHeight
|
||||||
|
let diff = bef - after
|
||||||
|
if (diff < 0) diff = diff * -1
|
||||||
|
window.scrollTo({ top: (window.scrollY + diff) })
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
previewStatus () {
|
previewStatus () {
|
||||||
|
|
|
||||||
|
|
@ -229,6 +229,15 @@
|
||||||
{{ $t('settings.deletePostsStreaming') }}
|
{{ $t('settings.deletePostsStreaming') }}
|
||||||
</BooleanSetting>
|
</BooleanSetting>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<BooleanSetting
|
||||||
|
path="fixupScrollOnPostWStreaming"
|
||||||
|
:disabled="!useStreamingApi"
|
||||||
|
expert="1"
|
||||||
|
>
|
||||||
|
{{ $t('settings.fixup_scroll_on_post_with_streaming') }}
|
||||||
|
</BooleanSetting>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
|
||||||
|
|
@ -577,6 +577,7 @@
|
||||||
},
|
},
|
||||||
"filtering": "Filtering",
|
"filtering": "Filtering",
|
||||||
"filtering_explanation": "All posts containing these words will be muted, one per line",
|
"filtering_explanation": "All posts containing these words will be muted, one per line",
|
||||||
|
"fixup_scroll_on_post_with_streaming": "Prevent the page from getting pushed down by new posts you make",
|
||||||
"follow_export": "Follow export",
|
"follow_export": "Follow export",
|
||||||
"follow_export_button": "Export your follows to a csv file",
|
"follow_export_button": "Export your follows to a csv file",
|
||||||
"follow_import": "Follow import",
|
"follow_import": "Follow import",
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,7 @@ export const defaultState = {
|
||||||
recurseSearchLimit: 100,
|
recurseSearchLimit: 100,
|
||||||
dedupeBoosts: true,
|
dedupeBoosts: true,
|
||||||
scrollToTopOnNewPostClick: true,
|
scrollToTopOnNewPostClick: true,
|
||||||
|
fixupScrollOnPostWStreaming: false,
|
||||||
showFaviconBadge: true,
|
showFaviconBadge: true,
|
||||||
autoRefreshOnRequired: true,
|
autoRefreshOnRequired: true,
|
||||||
showUnreadInTitle: true,
|
showUnreadInTitle: true,
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ const defaultState = {
|
||||||
recurseSearchLimit: 100,
|
recurseSearchLimit: 100,
|
||||||
dedupeBoosts: true,
|
dedupeBoosts: true,
|
||||||
scrollToTopOnNewPostClick: true,
|
scrollToTopOnNewPostClick: true,
|
||||||
|
fixupScrollOnPostWStreaming: false,
|
||||||
showFaviconBadge: true,
|
showFaviconBadge: true,
|
||||||
autoRefreshOnRequired: true,
|
autoRefreshOnRequired: true,
|
||||||
showUnreadInTitle: true,
|
showUnreadInTitle: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue