From abc6461f36269ce071b4597a69e476f3b4c1d8f6 Mon Sep 17 00:00:00 2001 From: Alfonso Salces Date: Fri, 11 Aug 2023 08:33:19 +0200 Subject: [PATCH] MOBILE-4372 course-format: Change user tour alignment in RTL --- .../features/course/components/course-format/course-format.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/features/course/components/course-format/course-format.ts b/src/core/features/course/components/course-format/course-format.ts index 381c6040a84..529fd01893d 100644 --- a/src/core/features/course/components/course-format/course-format.ts +++ b/src/core/features/course/components/course-format/course-format.ts @@ -51,6 +51,7 @@ import { CoreCourseCourseIndexTourComponent } from '../course-index-tour/course- import { CoreDom } from '@singletons/dom'; import { CoreUserTourDirectiveOptions } from '@directives/user-tour'; import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics'; +import { CorePlatform } from '@services/platform'; /** * Component to display course contents using a certain format. If the format isn't found, use default one. @@ -93,7 +94,7 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy { id: 'course-index', component: CoreCourseCourseIndexTourComponent, side: CoreUserToursSide.Top, - alignment: CoreUserToursAlignment.End, + alignment: CorePlatform.isRTL ? CoreUserToursAlignment.Start : CoreUserToursAlignment.End, getFocusedElement: nativeButton => { const innerButton = Array.from(nativeButton.shadowRoot?.children ?? []).find(child => child.tagName === 'BUTTON');