mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-05 10:12:46 +00:00
Fixed few bugs related to login/logout
* Pressing the logout button now brings the setup page up again * Removing a server and readding one of which the hash of the address has a higher value than the previous one does no longer cause the application to request a login each time you open it. * The method for deciding if the user is in setup has been changed. It now checks if a page in the pageStack has the property _isSetupPage, which works better than manually keeping track of state.
This commit is contained in:
parent
0357227134
commit
a358caf13e
7 changed files with 37 additions and 16 deletions
|
@ -73,7 +73,6 @@ Page {
|
|||
clip: true
|
||||
height: {
|
||||
if (count > 0) {
|
||||
console.log(collectionType)
|
||||
if (["tvshows", "movies"].indexOf(collectionType) == -1) {
|
||||
Constants.libraryDelegateHeight
|
||||
} else {
|
||||
|
@ -99,7 +98,7 @@ Page {
|
|||
/*model.imageTags["Primary"] ? ApiClient.baseUrl + "/Items/" + model.id
|
||||
+ "/Images/Primary?maxHeight=" + height + "&tag=" + model.imageTags["Primary"]
|
||||
: ""*/
|
||||
landscape: ["Series", "Movie"].indexOf(model.type) == -1
|
||||
landscape: !Utils.usePortraitCover(model.type)
|
||||
|
||||
onClicked: {
|
||||
pageStack.push(Qt.resolvedUrl("DetailPage.qml"), {"itemId": model.id})
|
||||
|
|
|
@ -14,6 +14,7 @@ Dialog {
|
|||
readonly property string address: serverSelect.currentItem._address
|
||||
readonly property bool addressCorrect: serverSelect.currentIndex > 0 || manualAddress.acceptableInput
|
||||
readonly property string serverName: serverSelect.currentItem._name
|
||||
readonly property bool _isSetupPage: true
|
||||
|
||||
|
||||
acceptDestination: AddServerConnectingPage {
|
||||
|
|
|
@ -35,7 +35,7 @@ Dialog {
|
|||
onAuthenticatedChanged: {
|
||||
if (ApiClient.authenticated) {
|
||||
console.log("authenticated!")
|
||||
pageStack.replaceAbove(pageStack.previousPage(firstPage), Qt.resolvedUrl("../MainPage.qml"))
|
||||
pageStack.replaceAbove(null, Qt.resolvedUrl("../MainPage.qml"))
|
||||
}
|
||||
}
|
||||
onAuthenticationError: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue