about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJenkins <jenkins@jenkins.ninjawedding.org>2017-12-13 20:17:13 +0000
committerJenkins <jenkins@jenkins.ninjawedding.org>2017-12-13 20:17:13 +0000
commit10f800ab46f992294907150177bdbf3e8265c915 (patch)
tree9769945a3c723465bed87760d9ce4b981efe3036
parent82236a37039043d134efb3ddbdd2a3e04e714e2c (diff)
parent7cad9264011a0e890fb20334b3e7d4003c055d68 (diff)
Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master
-rw-r--r--app/javascript/mastodon/features/ui/components/columns_area.js9
-rw-r--r--lib/mastodon/version.rb2
2 files changed, 6 insertions, 5 deletions
diff --git a/app/javascript/mastodon/features/ui/components/columns_area.js b/app/javascript/mastodon/features/ui/components/columns_area.js
index c5b3c20d4..f00b74dfd 100644
--- a/app/javascript/mastodon/features/ui/components/columns_area.js
+++ b/app/javascript/mastodon/features/ui/components/columns_area.js
@@ -27,8 +27,6 @@ const componentMap = {
   'LIST': ListTimeline,
 };
 
-const isRtlLayout = document.getElementsByTagName('body')[0].classList.contains('rtl');
-
 @component => injectIntl(component, { withRef: true })
 export default class ColumnsArea extends ImmutablePureComponent {
 
@@ -55,7 +53,10 @@ export default class ColumnsArea extends ImmutablePureComponent {
     if (!this.props.singleColumn) {
       this.node.addEventListener('wheel', this.handleWheel,  detectPassiveEvents.hasSupport ? { passive: true } : false);
     }
-    this.lastIndex = getIndex(this.context.router.history.location.pathname);
+
+    this.lastIndex   = getIndex(this.context.router.history.location.pathname);
+    this.isRtlLayout = document.getElementsByTagName('body')[0].classList.contains('rtl');
+
     this.setState({ shouldAnimate: true });
   }
 
@@ -81,7 +82,7 @@ export default class ColumnsArea extends ImmutablePureComponent {
 
   handleChildrenContentChange() {
     if (!this.props.singleColumn) {
-      const modifier = isRtlLayout ? -1 : 1;
+      const modifier = this.isRtlLayout ? -1 : 1;
       this._interruptScrollAnimation = scrollRight(this.node, (this.node.scrollWidth - window.innerWidth) * modifier);
     }
   }
diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb
index a430ac225..a6fa0ddd6 100644
--- a/lib/mastodon/version.rb
+++ b/lib/mastodon/version.rb
@@ -17,7 +17,7 @@ module Mastodon
     end
 
     def pre
-      'rc4'
+      'rc5'
     end
 
     def flags