1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2024-11-22 09:15:18 +00:00

Reindent with spaces

This commit is contained in:
Chris Josten 2020-09-27 00:48:13 +02:00
parent a358caf13e
commit 1ba7f6f8ef

View file

@ -8,7 +8,7 @@ import "components"
import "pages" import "pages"
ApplicationWindow { ApplicationWindow {
id: appWindow id: appWindow
property bool _hasInitialized: false property bool _hasInitialized: false
// The global mediaPlayer instance // The global mediaPlayer instance
readonly property MediaPlayer mediaPlayer: _mediaPlayer readonly property MediaPlayer mediaPlayer: _mediaPlayer
@ -22,12 +22,12 @@ ApplicationWindow {
} }
// Data of the currently selected item. For use on the cover. // Data of the currently selected item. For use on the cover.
property var itemData property var itemData
//FIXME: proper error handling //FIXME: proper error handling
Connections { Connections {
target: ApiClient target: ApiClient
onNetworkError: errorNotification.show("Network error: " + error) onNetworkError: errorNotification.show("Network error: " + error)
onConnectionFailed: errorNotification.show("Connect error: " + error) onConnectionFailed: errorNotification.show("Connect error: " + error)
//onConnectionSuccess: errorNotification.show("Success: " + loginMessage) //onConnectionSuccess: errorNotification.show("Success: " + loginMessage)
onSetupRequired: { onSetupRequired: {
var isInSetup = pageStack.find(function (page) { return typeof page._isSetupPage !== "undefined" }) !== null var isInSetup = pageStack.find(function (page) { return typeof page._isSetupPage !== "undefined" }) !== null
@ -36,28 +36,28 @@ ApplicationWindow {
pageStack.replace(Qt.resolvedUrl("pages/setup/AddServerPage.qml"), {"backNavigation": false}); pageStack.replace(Qt.resolvedUrl("pages/setup/AddServerPage.qml"), {"backNavigation": false});
} }
} }
} }
MediaPlayer { MediaPlayer {
id: _mediaPlayer id: _mediaPlayer
autoPlay: true autoPlay: true
} }
initialPage: Component { initialPage: Component {
MainPage { MainPage {
Connections { Connections {
target: ApiClient target: ApiClient
// Replace the MainPage if no server was set up. // Replace the MainPage if no server was set up.
} }
onStatusChanged: { onStatusChanged: {
if (status == PageStatus.Active && !_hasInitialized) { if (status == PageStatus.Active && !_hasInitialized) {
_hasInitialized = true; _hasInitialized = true;
ApiClient.restoreSavedSession(); ApiClient.restoreSavedSession();
} }
} }
} }
} }
cover: { cover: {
if ([MediaPlayer.NoMedia, MediaPlayer.InvalidMedia, MediaPlayer.UnknownStatus].indexOf(mediaPlayer.status) >= 0) { if ([MediaPlayer.NoMedia, MediaPlayer.InvalidMedia, MediaPlayer.UnknownStatus].indexOf(mediaPlayer.status) >= 0) {
if (itemData) { if (itemData) {
@ -69,16 +69,16 @@ ApplicationWindow {
return Qt.resolvedUrl("cover/VideoCover.qml") return Qt.resolvedUrl("cover/VideoCover.qml")
} }
} }
allowedOrientations: Orientation.All allowedOrientations: Orientation.All
Notification { Notification {
id: errorNotification id: errorNotification
previewSummary: "foo" previewSummary: "foo"
isTransient: true isTransient: true
function show(data) { function show(data) {
previewSummary = data; previewSummary = data;
publish(); publish();
} }
} }
} }