FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

refactor: remove listener · NativeScript/NativeScript@7e4ac06 · GitHub

Commit 7e4ac06

Browse files
committed
refactor: remove listener
Also remove iOS orientation setter.
1 parent 989f6ca commit 7e4ac06

3 files changed

Lines changed: 1 addition & 13 deletions

File tree

‎tns-core-modules/application/application-common.ts‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import "../globals";
33
import { Observable, EventData } from "../data/observable";
44
import { View } from "../ui/core/view";
5-
import { device } from "../platform";
65
import {
76
trace as profilingTrace,
87
time,
@@ -39,7 +38,6 @@ import {
3938
DiscardedErrorEventData,
4039
iOSApplication,
4140
LoadAppCSSEventData,
42-
OrientationChangedEventData,
4341
UnhandledErrorEventData
4442
} from "./application";
4543

@@ -123,12 +121,6 @@ export function addCss(cssText: string): void {
123121
events.notify(<CssChangedEventData>{ eventName: "cssChanged", object: app, cssText: cssText });
124122
}
125123

126-
on(orientationChangedEvent, (args: OrientationChangedEventData) => {
127-
if (app.orientation !== args.newValue) {
128-
app.orientation = args.newValue;
129-
}
130-
});
131-
132124
global.__onUncaughtError = function (error: NativeScriptError) {
133125
events.notify(<UnhandledErrorEventData>{ eventName: uncaughtErrorEvent, object: app, android: error, ios: error, error: error });
134126
};

‎tns-core-modules/application/application.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ export class AndroidApplication extends Observable {
410410
startActivity: any /* androidx.appcompat.app.AppCompatActivity */;
411411

412412
/**
413-
* Gets or sets the orientation of the application.
413+
* Gets the orientation of the application.
414414
* Available values: "portrait", "landscape", "unknown".
415415
*/
416416
orientation: "portrait" | "landscape" | "unknown";

‎tns-core-modules/application/application.ios.ts‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,6 @@ class IOSApplication implements IOSApplicationDefinition {
101101
return this._orientation;
102102
}
103103

104-
set orientation(value: "portrait" | "landscape" | "unknown") {
105-
this._orientation = value;
106-
}
107-
108104
get rootController(): UIViewController {
109105
return this._window.rootViewController;
110106
}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL