From c9d1b820044024bda4de8a0261b645cc4ffadadb Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Mon, 31 Aug 2020 14:52:54 +1000 Subject: [PATCH] add auto switch to RTL body if locale in rtlLocales --- js/views/app_view.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/views/app_view.js b/js/views/app_view.js index 144cb3e2c..0b21359fe 100644 --- a/js/views/app_view.js +++ b/js/views/app_view.js @@ -22,11 +22,18 @@ openInbox: 'openInbox', }, applyTheme() { + const rtlLocales = ['fa'] const theme = storage.get('theme-setting') || 'light'; this.$el .removeClass('light-theme') .removeClass('dark-theme') + .removeClass('rtl') .addClass(`${theme}-theme`); + + const loc = window.i18n.getLocale() + if (rtlLocales.includes(loc)) { + this.$el.addClass('rtl'); + } }, applyHideMenu() { const hideMenuBar = storage.get('hide-menu-bar', true);