Commit b6739ffe authored by Dennis Beier's avatar Dennis Beier
Browse files

crash fixes

parent 99180164
Subproject commit ab62aa0f6e69a988dfad0fa85e1bf9a4b713d9fc
Subproject commit 44b704cb127160598fa14aa2c060ecf37b37a322
......@@ -75,10 +75,8 @@ ApplicationWindow {
rocketChatController.setUsername("default","")
rocketChatController.setPassword("default","")
rocketChatController.setCurrentChannel("default", "", "")
mainStack.clear()
mainViewPushed = false
channelPushed = false
mainStack.push(serverSelectionComponent)
}
function toMainView() {
if (!mainViewPushed) {
......@@ -117,13 +115,6 @@ ApplicationWindow {
id: logoutDialog
text: qsTr("logout ?")
onYes: {
console.log("logout accepted")
rocketChatController.logout("default")
}
onRejected: {
}
}
ListModel {
id: emojiCustomGridModel
......@@ -175,7 +166,7 @@ ApplicationWindow {
}
}
onLoggedOut: {
mainStack.reset()
mainStack.pop(null)
}
onServerConnected: {
connectionState = 1
......
......@@ -32,8 +32,13 @@ Item {
target: mainStack
onCurrentItemChanged:{
var current =serverChoices.currentServer;
if(serverChoices.currentServer)
if(serverChoices.currentServer){
currentServerSetting.currentServerChoice = serverChoices.currentServer;
rocketChatController.newServerByDomain(currentServerSetting.currentServerChoice)
serverChoices.currentServer = ""
}
console.log("reset server");
checkConnectionState();
}
}
function login() {
......@@ -72,7 +77,7 @@ Item {
color :"transparent"
Text {
id: currentServer
text: "demo.rocketchat.com"
text: "chat.fairkom.net"
anchors.left: parent.left
color: Colors.white
font.pointSize: Fonts.largeFontSize
......
......@@ -24,14 +24,14 @@ Page {
id: serverListView
model:serverChoices
delegate: MouseArea {
delegate: Button {
//color: Colors.grey
height: 58
anchors.left: parent.left
anchors.right: parent.right
onPressed: {
onClicked:{
serverChoices.currentServer = model.domain;
mainStack.push("qrc:/qml/pages/LoginPage.qml")
mainStack.pop();
}
......@@ -74,7 +74,7 @@ Page {
anchors.right: parent.right
flat: true
anchors.verticalCenter: parent.verticalCenter
visible: model.domain === "chat.fairkom.com"
visible: !(model.domain === "chat.fairkom.net")
}
}
Rectangle {
......
......@@ -16,11 +16,6 @@ Page{
LogoutDialog {
id: logoutDialog
text: qsTr("logout ?")
onYes: {
console.log("logout accepted")
rocketChatController.logout("default")
}
onRejected: {
}
......
......@@ -11,7 +11,6 @@ Popup {
x: (Screen.width-logoutDialog.width)/2
y: (Screen.height-logoutDialog.height)/2
property string text
signal yes
signal rejected
modal: true
focus: true
......@@ -40,7 +39,7 @@ Popup {
width: 125
text: qsTr("Yes")
onPressed: {
logoutDialog.yes()
rocketChatController.logout("current");
logoutDialog.close()
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment