Skip to content

Commit 7ceda64

Browse files
committed
fix: initialize RTL check once
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
1 parent c974da9 commit 7ceda64

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

src/components/NcActionButton/NcActionButton.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,9 @@ import CheckIcon from 'vue-material-design-icons/Check.vue'
371371
import ChevronRightIcon from 'vue-material-design-icons/ChevronRight.vue'
372372
import ChevronLeftIcon from 'vue-material-design-icons/ChevronLeft.vue'
373373
import ActionTextMixin from '../../mixins/actionText.js'
374-
import { isRTL } from '@nextcloud/l10n'
374+
import { isRTL as isRTLFunction } from '@nextcloud/l10n'
375+
376+
const isRTL = isRTLFunction()
375377
376378
/**
377379
* Button component to be used in Actions
@@ -386,7 +388,7 @@ export default {
386388
},
387389
setup() {
388390
return {
389-
isRTL: isRTL(),
391+
isRTL,
390392
}
391393
},
392394
mixins: [ActionTextMixin],

src/components/NcActionTextEditable/NcActionTextEditable.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ import GenRandomId from '../../utils/GenRandomId.js'
9898
import ArrowLeft from 'vue-material-design-icons/ArrowLeft.vue'
9999
import ArrowRight from 'vue-material-design-icons/ArrowRight.vue'
100100
101-
import { isRTL } from '@nextcloud/l10n'
101+
import { isRTL as isRTLFunction } from '@nextcloud/l10n'
102+
103+
const isRTL = isRTLFunction()
102104
103105
export default {
104106
name: 'NcActionTextEditable',
@@ -170,7 +172,7 @@ export default {
170172
const model = useModelMigration('value', 'update:value')
171173
return {
172174
model,
173-
isRTL: isRTL(),
175+
isRTL,
174176
}
175177
},
176178

src/components/NcAppContent/NcAppContent.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ import { Splitpanes, Pane } from 'splitpanes'
112112
113113
import 'splitpanes/dist/splitpanes.css'
114114
import { emit } from '@nextcloud/event-bus'
115-
import { isRTL } from '@nextcloud/l10n'
115+
import { isRTL as isRTLFunction } from '@nextcloud/l10n'
116+
117+
const isRTL = isRTLFunction()
116118
117119
const browserStorage = getBuilder('nextcloud').persist().build()
118120
@@ -227,7 +229,7 @@ export default {
227229
setup() {
228230
return {
229231
isMobile: useIsMobile(),
230-
isRTL: isRTL(),
232+
isRTL,
231233
}
232234
},
233235

src/components/NcAppContent/NcAppDetailsToggle.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ import ArrowRight from 'vue-material-design-icons/ArrowRight.vue'
2727
import ArrowLeft from 'vue-material-design-icons/ArrowLeft.vue'
2828
2929
import { useIsMobile } from '../../composables/useIsMobile/index.js'
30-
import { isRTL } from '@nextcloud/l10n'
30+
import { isRTL as isRTLFunction } from '@nextcloud/l10n'
31+
32+
const isRTL = isRTLFunction()
3133
3234
export default {
3335
name: 'NcAppDetailsToggle',
@@ -43,7 +45,7 @@ export default {
4345
},
4446
setup() {
4547
return {
46-
isRTL: isRTL(),
48+
isRTL,
4749
isMobile: useIsMobile(),
4850
}
4951
},

0 commit comments

Comments
 (0)