Skip to content

Commit fcfa978

Browse files
committed
MOBILE-4840 keyboard: Use getters for accessing read-only signals
1 parent 60d1782 commit fcfa978

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/core/features/comments/pages/viewer/viewer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ export default class CoreCommentsViewerPage implements OnInit, OnDestroy, AfterV
129129
});
130130

131131
effect(() => {
132-
const shown = CoreKeyboard.getKeyboardShownSignal();
132+
const shown = CoreKeyboard.keyboardShownSignal();
133133

134134
/// Force when opening.
135-
this.scrollToBottom(shown());
135+
this.scrollToBottom(shown);
136136
});
137137
}
138138

src/core/features/editor/components/rich-text-editor/rich-text-editor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export class CoreEditorRichTextEditorComponent implements AfterViewInit, OnDestr
111111

112112
effect(() => {
113113
// Signal will be triggered when the keyboard is shown or hidden.
114-
CoreKeyboard.getKeyboardShownSignal();
114+
CoreKeyboard.keyboardShownSignal();
115115

116116
// Opening or closing the keyboard also calls the resize function, but sometimes the resize is called too soon.
117117
// Check the height again, now the window height should have been updated.

src/core/features/mainmenu/pages/menu/menu.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export default class CoreMainMenuPage implements OnInit, OnDestroy {
123123

124124
if (CorePlatform.isIOS()) {
125125
effect(() => {
126-
const shown = CoreKeyboard.getKeyboardShownSignal();
126+
const shown = CoreKeyboard.keyboardShownSignal();
127127
// In iOS, the resize event is triggered before the keyboard is opened/closed and not triggered again once done.
128128
// Init handlers again once keyboard is closed since the resize event doesn't have the updated height.
129129
if (!shown) {

src/core/singletons/keyboard.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export class CoreKeyboard {
5858
*
5959
* @returns Signal indicating whether the keyboard is shown.
6060
*/
61-
static getKeyboardShownSignal(): Signal<boolean> {
61+
static get keyboardShownSignal(): Signal<boolean> {
6262
return CoreKeyboard.IS_KEYBOARD_SHOWN.asReadonly();
6363
}
6464

@@ -67,7 +67,7 @@ export class CoreKeyboard {
6767
*
6868
* @returns Signal indicating the keyboard height.
6969
*/
70-
static getKeyboardHeightSignal(): Signal<number> {
70+
static get keyboardHeightSignal(): Signal<number> {
7171
return CoreKeyboard.KEYBOARD_HEIGHT.asReadonly();
7272
}
7373

0 commit comments

Comments
 (0)