diff --git a/README.md b/README.md
index 4a5b7be9..3ddc081d 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
## list of changes in this fork:
- additional confirmations for:
- post visibility (choose direct, private, unlisted, public, local)
- - posting with an attachment marked sensitive but no cw
+ - posting with an attachment marked sensitive but no cw (todo: fix the conf showing up with no attachments)
- biting:
- users
- notes
@@ -26,6 +26,7 @@
- for unreads:
- option to disable favicon badge changing on unreads
- option to disable title showing unreads
+ - option to not scroll to the top when showing unreads
- update the list of emojis:
- switched weird unicode ones to proper emojis
- emojis are sourced from discord's list of emojis
diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue
index c0bf3489..ed3b3c3d 100644
--- a/src/components/settings_modal/tabs/general_tab.vue
+++ b/src/components/settings_modal/tabs/general_tab.vue
@@ -201,6 +201,14 @@
+
+
+ {{ $t('settings.scroll_to_top_on_new_post_click') }}
+
+
0) {
+ // i REALLY don't like this code. it results in flickering best case scenario. this is kind of just a limit
+ // of how akko-fe is written, and being able to do this without flicker would require an async rewrite most
+ // likely. this is probably the best way this can be reasonably done without a full rewrite.
+ setTimeout(function() {
+ let after = document.getElementsByClassName("Timeline")[0].scrollHeight
+ let diff = bef - after
+ if (diff < 0) diff = diff * -1
+ window.scrollTo({ top: (window.scrollY + diff) })
+ }, 0);
}
},
fetchOlderStatuses: throttle( function () {
diff --git a/src/i18n/en.json b/src/i18n/en.json
index d024dffd..aa69983a 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -753,6 +753,7 @@
"saving_err": "Error saving settings",
"saving_ok": "Settings saved",
"scope_copy": "Copy scope when replying (DMs are always copied)",
+ "scroll_to_top_on_new_post_click": "Scroll to the top when showing new posts (disabling this may result in buggy behavior)",
"search_pagination_limit": "Results to show per search page",
"search_user_to_block": "Search whom you want to block",
"search_user_to_mute": "Search whom you want to mute",
diff --git a/src/modules/config.js b/src/modules/config.js
index efed69b4..777f052b 100644
--- a/src/modules/config.js
+++ b/src/modules/config.js
@@ -128,6 +128,7 @@ export const defaultState = {
recurseSearch: false,
recurseSearchLimit: 100,
dedupeBoosts: true,
+ scrollToTopOnNewPostClick: true,
showFaviconBadge: true,
autoRefreshOnRequired: true,
showUnreadInTitle: true,
diff --git a/src/modules/instance.js b/src/modules/instance.js
index 75dd6aa7..6477d9b1 100644
--- a/src/modules/instance.js
+++ b/src/modules/instance.js
@@ -84,6 +84,7 @@ const defaultState = {
recurseSearch: false,
recurseSearchLimit: 100,
dedupeBoosts: true,
+ scrollToTopOnNewPostClick: true,
showFaviconBadge: true,
autoRefreshOnRequired: true,
showUnreadInTitle: true,